TeX2page is available on GitHub.
git clone https://github.com/ds26gte/tex2page
produces a directory
tex2page, which contains, among other files:
the Racket file
tex2page.rkt, the Common Lisp file
tex2page.lisp, the plain TeX file
tex2page.tex, and the LaTeX package
Put copies of (or links to) the files
tex2page.sty in a directory
that is mentioned in your
If you run a Common Lisp on a Unix, you can use the supplied script
tex2page.lisp after setting the environment variable
LISP to the
name of your Lisp implementation. Put
tex2page.lisp in your
PATH. You may rename it to
The top few lines in
tex2page.lisp contain the lines
that invoke Lisp — if they don’t already address your
implementation, you may need to add a line based on your
Lisp’s command line options.
If you run Racket  on a Unix (including Mac OS X and
Cygwin ), setup is minimal. Simply put a copy of (or link to) the Scheme
tex2page.rkt in a directory in your
variable. You may rename it to
If you run Racket on Windows,
copy the supplied batchfile
PATH, and edit its contents so it contains
the correct pathnames to your Racket executable and
In general, you need to configure TeX2page so it runs on your system. Even in cases where the supplied script runs “out of the box” for your setup, it may still be a good idea to do an explicit configuration.
This method may not always work but is so easy that it’s worth a try. It should work for most dialects on Unix.
./configure ‑‑help at your OS command line
to get the list of dialects supported.
If your dialect
D is one of them,
If all goes well, this will create
tex2page, a version of TeX2page that’s suited to
Put it in your
TeX2page is known to configure for the Scheme dialects Chez , Chicken , Gambit , Gauche , Guile , and Racket ; and the Common Lisp implementations ABCL, Allegro, CLISP, Clozure, CMUCL, ECL, and SBCL.
./configure ‑‑dialect=D approach above
essentially takes care to call Scmxlate (if needed) as described in
this section, but unfortunately it may not work for
some dialects or operating systems. In such cases, you
can manually call Scmxlate, which isn’t really all that
First ensure that
is installed on your system. Note down the pathname of
scmxlate.scm in the unpacked
Optionally, edit the file
scmxlate‑tex2page.rkt in the
tex2page directory. (Leaving it as is is just fine.)
Possible insertions are:
(scmxlate-compile #t) (define *ghostscript* "pathname-of-your-ghostscript-program")
The first produces a compiled version of TeX2page. The second lets you supply the correct pathname for the Ghostscript executable. (TeX2page will guess the Ghostscript pathname, but there is a possibility it guesses wrong on Windows.)
Start your Scheme (or Common Lisp) in the
tex2page directory. Load the file
scmxlate.scm from the
scmxlate distribution, using the correct relative
or full pathname of
scmxlate.scm. For example,
(assuming you unpacked Scmxlate in
/home/dorai/share). You will be asked a couple
of questions about your setup. A choice of answers
will be provided, so you don’t need to be too creative.
When Scmxlate finishes, you will be left with a
tex2page that is tailormade for your system.
On Windows, a batch file called
is also created. Move it to a directory in your
PATH. Edit the contents of
that the pathnames it refers to are correct.