Practical Common Lisp is a nicely typeset book. The author of , Peter Seibel, generously makes available his Common Lisp based publishing platform that he used to typeset proof-copies of the book. The latest version of this platform can be acquired on github or via Quicklisp. This latest version seems to have no ability to generate PDF output. I wanted output to PDF and HTML. So…
Wayback Machine to the rescue.
Here are the steps to getting the system found by the Wayback Machine installed and working:
You should have Quicklisp installed.
Download and extract the Markup, Foo, Macro Utilities, and Utilities systems from the Wayback Machine.
Fire up your Emacs/Slime/Lisp rig. See Using Emacs and Slime with Lispworks on OSX for a way to do this for Lispworks. I actually used Clozure CL for this though.
In the Slime REPL, tell Lisp where to find the systems you downloaded:
In my case that means:
CL-USER> (dolist (dir (list #p”/Users/lriley/src/snapshot/markup-0.3/”
(push dir asdf:central-registry))
CL-USER> (dolist (asd (list #p”/Users/lriley/src/snapshot/markup-0.3/com.gigamonkeys.markup.asd”
CL-USER> (ql:quickload ‘com.gigamonkeys.markup)
Change SLIME working directory to the Markup directory:
CL-USER>, cd /Users/lriley/src/markup-0.3
Modify parameters.lisp as desired and recompile:
(defparameter copyright “2012, Lang Riley”
“Included in copyright notice included in footer of PDF output.”)
Change to the Markup package (notice the use of TAB completion which is available in numerous places using Slime):
CL-USER>, in com.giga mark
Test the PDF output using the Markup example file provided:
MARKUP> (render :pdf “docs.txt”)
Test the HTML output:
MARKUP> (render :html “docs.txt”)
A big thanks to Peter Seibel for enriching the Common Lisp ecosystem in many ways! Hopefully Peter Seibel will update his current version to output PDF (and RTF too), but until then this does the trick.