z-logo
Premium
Developing a Lisp‐based preprocessor for TEX documents
Author(s) -
Iwasaki Hideya
Publication year - 2002
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.485
Subject(s) - lisp , macro , computer science , programming language , preprocessor , common lisp , set (abstract data type) , expression (computer science) , scheme (mathematics) , exception handling , software engineering , mathematical analysis , mathematics
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. Copyright © 2002 John Wiley & Sons, Ltd.

This content is not available in your region!

Continue researching here.

Having issues? You can contact us here