RSS Feed

Lisp Project of the Day


You can support this project by donating at:

Donate using PatreonDonate using Liberapay

Or see the list of project sponsors.


Tests 🥺
CI 🥺

This is a little wrapper around TeX language to make it compatible with Lisp's sexps. Written by @eugeneia_.

Here is a little example, I've taken from the documentation:

POFTHEDAY> (defun tex-menu (menu)
             (texp:deftex item (caption price)
               (texp:$ caption) " " (texp:$ (texp:escape "$")) (texp:$ price)
             (loop for (caption price) in menu
                   do (texp:tex (item {(texp:$ (texp:escape caption))}
                                      {(texp:$ (texp:escape price))})))
             (texp:tex (bye)))

POFTHEDAY> (tex-menu '(("Mozzarella Sticks" "5.99")
                       ("Onion Rings" "4.99")
                       ("Spinach" "5.99")))
\def \item #1#2{#1 \$#2

\bigskip }

\item {Mozzarella Sticks}{5.99}\item {Onion Rings}{4.99}\item {Spinach}{5.99}\bye

To render the DVI file, save this output into the file example.tex and run tex example.tex. (On OSX you can install TeX using brew cask install mactex.)

This command will generate example.tex file which will look like that:

With this system, you can use full power or the Lisp to write publishing systems. For example, Geneva documentation system uses it to generate TeX and LaTeX outputs.

Brought to you by 40Ants under Creative Commons License