The texp Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The texp Reference Manual

This is the texp Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:39:44 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

texp

Description:

texp is a domain specific language for producing TeX documents with Common Lisp.

Documentation:


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 texp

Author

Max Rottenkolber <max@mr.gy>

License

GNU Affero General Public License

Description

DSL for outputting TeX expressions using S-expressions.

Dependency

named-readtables

Source

texp.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 texp.asd

Location

texp.asd

Systems

texp (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 texp/texp.lisp

Parent

texp (system)

Location

texp.lisp

Packages

texp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.3 texp/syntax.lisp

Dependency

texp.lisp (file)

Parent

texp (system)

Location

syntax.lisp

Internal Definitions

parenthesized-list-reader (function)


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 texp

DSL for outputting _TeX_ expressions using S-expressions.

Source

texp.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *escape-table*

*Description:*

_Alist_ mapping _TeX_ special characters to quoted equivalent.

Package

texp

Source

texp.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Macros

Macro: deftex NAME PARAMETERS &body FORMS

_parameters_::= {(}{{}_var_{\}}\*{)}

*Arguments and Values:*

_name_—a _symbol_ or _string_.

_forms_—_forms_.

_var_—a _symbol_.

*Description:*

{deftex} prints the definition of a _TeX_ macro with _name_ that expands to _forms_ to {*standard-output*}. If _name_ is a _symbol_ it will be printed in lower case. _Forms_ are evaluated as if by {tex} with each _var_ in _parameters_ bound to a numeric _TeX_ parameter identifier.

*Examples:*

#code#
(deftex hello (name) "Hello " ($ name))
▷ \def \hello #1{Hello #1}
#

Package

texp

Source

texp.lisp (file)

Macro: tex &rest EXPRESSIONS

_expressions_::= ↓_expression_\*

_expression_::= ↓_break-clause_ | ↓_interpolation-clause_ | ↓_brackets-clause_ | ↓_braces-clause_ | ↓_tex-clause_ | _literal_

_break-clause_::= {(br)}

_interpolation-clause_::= {($} _form_{)}

_brackets-clause_::= {([]} {{}_expression_{\}}\*{)}

_braces-clause_::= {({\}} {{}_expression_{\}}\*{)}

_tex-clause_::= {(} _tex-macro_ {{}_expression_{\}}\*{)}

*Arguments and Values:*

_literal_—a _string_, _symbol_ or _number_.

_form_—a _form_.

_tex-macro_—a _symbol_ or a _string_.

*Description:*

{tex} compiles _TeX expressions_ to {*standard-output*}.

A _Literal_ is printed as follows:

+ a _string_ is printed as it is
+ a _symbol_ is printed in lower case
+ a _number_ is printed _readably_

A _tex-clause_ prints a _TeX_ macro call of _tex-macro_ followed by _expressions_.

A _break-clause_ prints two newlines (e.g. a paragraph separator).

An _interpolation-clause_ evaluates _form_ and prints its result if the result is a _string_.

_Bracket-clause_ and _braces-clause_ print _expressions_ surrounded by brackets ({[}, {]}) and braces ({{}, {\}}) respectively. If the _readtable_ {texp:syntax} is used then _bracket-clause_ and _braces-clause_ can be written as {[} _expression_\* {]} and {{} _expression_\* {}}.

Package

texp

Source

texp.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Functions

Function: escape STRING

*Arguments and Values:*

_string_—a _string_.

*Description:*

{escape} encodes _string_ as defined by {*escape-table*}. E.g. it quotes _TeX_ special characters.

Package

texp

Source

texp.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: compile-break ()

Print double newline.

Package

texp

Source

texp.lisp (file)

Function: compile-expression EXPRESSION

Compile _TeX_ EXPRESSION.

Package

texp

Source

texp.lisp (file)

Function: compile-expressions EXPRESSIONS

Compile _TeX_ EXPRESSIONS.

Package

texp

Source

texp.lisp (file)

Function: compile-interpolation EXPRESSION

Interpolate EXPRESSIONS into the TEX macro.

Package

texp

Source

texp.lisp (file)

Function: compile-macro-call NAME &rest ARGUMENTS

Compile call to macro with NAME and ARGUMENTS.

Package

texp

Source

texp.lisp (file)

Function: compile-newline ()

Print explicit newline.

Package

texp

Source

texp.lisp (file)

Function: compile-parameters PARAMETERS

Returns a map of PARAMETERS to _TeX_ macro parameter pointers of the form ’#<N>’ and a parameter string for _TeX_’s \\def.

Package

texp

Source

texp.lisp (file)

Function: compile-parenthesized OPEN CLOSE EXPRESSIONS

Compile EXPRESSIONS parenthesized by OPEN and CLOSE.

Package

texp

Source

texp.lisp (file)

Function: compile-with-braces EXPRESSIONS

Compile EXPRESSIONS parenthesized by braces.

Package

texp

Source

texp.lisp (file)

Function: compile-with-brackets EXPRESSIONS

Compile EXPRESSIONS parenthesized by brackets.

Package

texp

Source

texp.lisp (file)

Function: escape-char CHARACTER

Return escaped string for CHARACTER.

Package

texp

Source

texp.lisp (file)

Function: escape-p CHARACTER

Predicate to test if CHARACTER needs to be escaped.

Package

texp

Source

texp.lisp (file)

Function: make-parameter-string N

Make parameter string for N parameters.

Package

texp

Source

texp.lisp (file)

Function: parenthesized-list-reader TYPE CLOSE

Return read macro function for parenthesized list terminated by CLOSE. It will be consed with TYPE.

Package

texp

Source

syntax.lisp (file)

Function: symbol-identifier SYMBOL

Return identifier string for SYMBOL.

Package

texp

Source

texp.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   T  
Index Entry  Section

F
File, Lisp, texp.asd: The texp<dot>asd file
File, Lisp, texp/syntax.lisp: The texp/syntax<dot>lisp file
File, Lisp, texp/texp.lisp: The texp/texp<dot>lisp file

L
Lisp File, texp.asd: The texp<dot>asd file
Lisp File, texp/syntax.lisp: The texp/syntax<dot>lisp file
Lisp File, texp/texp.lisp: The texp/texp<dot>lisp file

T
texp.asd: The texp<dot>asd file
texp/syntax.lisp: The texp/syntax<dot>lisp file
texp/texp.lisp: The texp/texp<dot>lisp file

Jump to:   F   L   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   C   D   E   F   M   P   S   T  
Index Entry  Section

C
compile-break: Internal functions
compile-expression: Internal functions
compile-expressions: Internal functions
compile-interpolation: Internal functions
compile-macro-call: Internal functions
compile-newline: Internal functions
compile-parameters: Internal functions
compile-parenthesized: Internal functions
compile-with-braces: Internal functions
compile-with-brackets: Internal functions

D
deftex: Exported macros

E
escape: Exported functions
escape-char: Internal functions
escape-p: Internal functions

F
Function, compile-break: Internal functions
Function, compile-expression: Internal functions
Function, compile-expressions: Internal functions
Function, compile-interpolation: Internal functions
Function, compile-macro-call: Internal functions
Function, compile-newline: Internal functions
Function, compile-parameters: Internal functions
Function, compile-parenthesized: Internal functions
Function, compile-with-braces: Internal functions
Function, compile-with-brackets: Internal functions
Function, escape: Exported functions
Function, escape-char: Internal functions
Function, escape-p: Internal functions
Function, make-parameter-string: Internal functions
Function, parenthesized-list-reader: Internal functions
Function, symbol-identifier: Internal functions

M
Macro, deftex: Exported macros
Macro, tex: Exported macros
make-parameter-string: Internal functions

P
parenthesized-list-reader: Internal functions

S
symbol-identifier: Internal functions

T
tex: Exported macros

Jump to:   C   D   E   F   M   P   S   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*escape-table*: Exported special variables

S
Special Variable, *escape-table*: Exported special variables

Jump to:   *  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S   T  
Index Entry  Section

P
Package, texp: The texp package

S
System, texp: The texp system

T
texp: The texp system
texp: The texp package

Jump to:   P   S   T