Go to the TeX2page website to download the TeX2page distribution. (The download link immediately follows the title.)
TeX2page is distributed as a gzip
ped tar
file,
tex2page.tar.gz
. Unpacking it produces a directory
called tex2page
, which contains, among other files,
the Scheme file tex2page
, the plain TeX file
tex2page.tex
, and the LaTeX package
tex2page.sty
.
Put copies of (or links to) the files
tex2page.tex
and tex2page.sty
in a directory
that is mentioned in your TEXINPUTS
environment
variable.
If you run MzScheme on Unix, setup is minimal.
Simply put a copy of (or link to) the Scheme file
tex2page
in a directory in your PATH
environment variable.
If you run MzScheme on Windows,
copy the supplied batchfile tex2page.bat
to your PATH
, and edit its contents so it contains
the correct pathnames to your MzScheme executable and
tex2page
file.
In general (including the setups listed above), you can use the Scmxlate program to configure TeX2page for your system. TeX2page is known to run on the Scheme dialects MzScheme [10], Bigloo [37], Chicken [42], Gambit [9], Gauche [20], Guile [11], MIT Scheme [28], Petite Chez Scheme [1], Pocket Scheme [16], Scheme 48 [21], SCM [19], Scsh [38], STklos [13], and SXM [7]; on the Common Lisp implementations CLISP [17], CMUCL [3], and SBCL [35]; on Unix and Windows (including Cygwin [5]).
Make sure you have the Scmxlate program installed on your system.
Edit the file scmxlate-tex2page
. You can leave it
empty. Optional insertions are:
(scmxlate-compile #t)
if you'd like a compiled version of tex2page
.
(define *ghostscript* "pathname-of-your-ghostscript-program")
TeX2page will guess a pathname for the Ghostscript executable, but it's possible it guesses wrong on Windows. You can explicitly supply the correct pathname here.
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,
(load "/home/dorai/share/scmxlate/scmxlate.scm")
(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
version of tex2page
called my-tex2page
,
tailormade for your system.
In Unix, put a copy of (or link to) my-tex2page
in a directory in your PATH
. You may wish to
rename it to tex2page
.
In Windows, a batch file called tex2page.bat
is also created. Move it to a directory in your
PATH
. Edit the contents of tex2page.bat
so
that the pathnames it refers to are correct.
tex2page
script?If the configuration process cannot create an
appropriate script file for you to put in your
PATH
, or if you prefer working within Scheme
anyway instead of at the OS command-line,
you can still use TeX2page. Simply load
your configured tex2page
Scheme file
(ie, my-tex2page
)
directly into
your Scheme, and then call the Scheme
procedure tex2page
on your source document. Eg,
(load "my-tex2page") (tex2page "tex2page-doc.tex")