Fixing PR11674 and then some

This commit is contained in:
Jay McCarthy 2011-01-27 12:51:34 -07:00
parent 45999143a4
commit d771211a7e
2 changed files with 14 additions and 6 deletions

View File

@ -15,6 +15,13 @@ To use SLaTeX as a standalone program, either drag your
@filepath{.tex} file onto SLaTeX (under Windows or MacOS X), or type @filepath{.tex} file onto SLaTeX (under Windows or MacOS X), or type
@exec{slatex file} in a command shell. @exec{slatex file} in a command shell.
@emph{NOTE:} If you compile your @filepath{.tex} file without using
@exec{slatex} (i.e., by using @exec{slatex -n} and then using @exec{latex}
directly), then your @envvar{TEXINPUTS} environment variable must contain
a reference to the directory in which the most recent version of
@filepath{slatex.sty} lives. That file resides by default in the @filepath{slatex}
collection of the main installation.
In addition to the SLaTeX tools, this collection contains a parallel In addition to the SLaTeX tools, this collection contains a parallel
set of PDF-SLaTeX tools, which are identical except that they set of PDF-SLaTeX tools, which are identical except that they
call @pdflatex rather than @|latex|. In particular, there is now a call @pdflatex rather than @|latex|. In particular, there is now a
@ -54,9 +61,3 @@ output.}
Accepts a filename and, if that file exists, it returns it. If the Accepts a filename and, if that file exists, it returns it. If the
filename appended with the suffix @filepath{.tex} exists, that filename appended with the suffix @filepath{.tex} exists, that
filename is returned. Otherwise, an exception is raised.} filename is returned. Otherwise, an exception is raised.}
@emph{NOTE:} in order to run @slatex, your @envvar{TEXINPUTS}
environment variable must contain a reference to the directory in
which the most recent version of @filepath{slatex.sty} lives. That
file resides by default in the @filepath{slatex} collection of the
main installation.

View File

@ -4,7 +4,10 @@
scheme/contract scheme/contract
mzlib/process mzlib/process
mzlib/sendevent mzlib/sendevent
scheme/runtime-path
"slatex.ss") "slatex.ss")
(define-runtime-path here ".")
(provide/contract (provide/contract
[slatex (string? . -> . boolean?)] [slatex (string? . -> . boolean?)]
@ -90,6 +93,10 @@
(lambda (latex-fun) (lambda (latex-fun)
(lambda (filename) (lambda (filename)
(slatex/no-latex filename) (slatex/no-latex filename)
(putenv "TEXINPUTS"
(format "~a:~a"
(path->string here)
(or (getenv "TEXINPUTS") "")))
(latex-fun filename)))]) (latex-fun filename)))])
(values (values
(meta-slatex latex) (meta-slatex latex)