Fix pdf-slatex to recognize the '-n' option (and to fail appropriately on

unknown options).

svn: r11086
This commit is contained in:
Stevie Strickland 2008-08-05 18:18:28 +00:00
parent 5f787a63d4
commit 2d042efe7a

View File

@ -13,9 +13,19 @@
(when (equal? (vector) argv)
(fprintf (current-error-port) "pdf-slatex: expected a file on the command line\n")
(exit 1))
(let ([result
(parameterize ([error-escape-handler exit])
(pdf-slatex (vector-ref argv 0)))])
(let* ([filename
(command-line
#:program "slatex"
#:once-each
[("-n" "--no-latex") "Just preprocess, don't run LaTeX"
(no-latex #t)]
#:args (filename)
filename)]
[result
(parameterize ([error-escape-handler exit])
(if (no-latex)
(slatex/no-latex filename)
(pdf-slatex filename)))])
(if result
(exit)
(exit 1)))]))