The Computer Journal
The TEXbook
Latex: a document preparation system
Latex: a document preparation system
Journal of Information Processing
GNU EMACS Manual
The Latex Companion
Hi-index | 0.00 |
TEX allows users to define a macro that abstracts a sequence of typesetting commands. However, defining macros is not easy for most users, because the mechanism of macro expansion in TEX is complicated. As a remedy for this situation, a new system that enables users to define macros for TEX documents as Lisp programs has been developed. The system acts as a preprocessor for TEX; given a document that contains Lisp programs as S-expressions, the system expands each S-expression on the basis of Lisp's evaluation rules, thus generating an ordinary TEX document. The system is very flexible and easy-to-use, thanks to the underlying language's general-purpose data structure, i.e. the S-expression, applicative order evaluation, and rich set of predefined functions. This paper also demonstrates that the proposed system is really effective for practical use by giving some concrete examples of Lisp macros, some of which are difficult to define in terms of TEX commands. The system is currently implemented on the Emacs Lisp, and a user-friendly environment is thus available in the Emacs text editor.