From 6fa56f33a427507139c3e9120ebdc1b17b2540ef Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 10 Aug 2005 22:33:42 +0000 Subject: [PATCH] Patch from Christopher Dutchyn, fixing lookup of executables on Windows, and bumping slatex up to version 20050609. svn: r578 --- collects/slatex/slatex-wrapper.ss | 14 +++++++++----- collects/slatex/slatex.ss | 4 ++-- collects/slatex/slatex.sty | 9 +++++++-- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/collects/slatex/slatex-wrapper.ss b/collects/slatex/slatex-wrapper.ss index ab96ddbff8..dea190a187 100644 --- a/collects/slatex/slatex-wrapper.ss +++ b/collects/slatex/slatex-wrapper.ss @@ -22,6 +22,12 @@ [else (error 'filename->latex-filename "~e does not exist" input-file)]))) + (define (exec-latex exe file) + (let ([latex-path (find-executable-path exe #f)]) + (unless latex-path + (error 'latex "could not find latex binary: ~e" exe)) + (system* latex-path file))) + ;; latex, pdf-latex : string -> boolean ;; boolean result indicates success (define-values (latex pdf-latex) @@ -63,11 +69,9 @@ (send-event "MACS" "aevt" "odoc" (vector 'file oztex-location))))) (send-event "OTEX" "aevt" "odoc" (vector 'file file)) #t] - [(windows unix macosx) ;; is this also okay for beos? - (let ([latex-path (find-executable-path command-name #f)]) - (unless latex-path - (error 'latex "could not find latex binary")) - (system* latex-path file))] + [(windows) (exec-latex (add-suffix command-name #".exe") file)] + [(unix macosx) ;; is this also okay for beos? + (exec-latex command-name file)] [else (error 'latex "do not know how to run ~s on ~s" command-name (system-type))]))))]) (values diff --git a/collects/slatex/slatex.ss b/collects/slatex/slatex.ss index 2a6ff929e2..6aee58440a 100644 --- a/collects/slatex/slatex.ss +++ b/collects/slatex/slatex.ss @@ -25,7 +25,7 @@ ;(c) Dorai Sitaram, ;http://www.ccs.neu.edu/~dorai/scmxlate/scmxlate.html -(define slatex::*slatex-version* "2.4z2") +(define slatex::*slatex-version* "20050609") (define slatex::*operating-system* (if (getenv "COMSPEC") 'windows 'unix)) @@ -317,7 +317,7 @@ (define slatex::*tex-calling-directory* "") -(define slatex::*max-line-length* 200) +(define slatex::*max-line-length* 300) (slatex::defenum &void-space diff --git a/collects/slatex/slatex.sty b/collects/slatex/slatex.sty index e9be1d3a8a..9106cf3a45 100644 --- a/collects/slatex/slatex.sty +++ b/collects/slatex/slatex.sty @@ -3,7 +3,7 @@ % style file to be used in (La)TeX when using SLaTeX % (c) Dorai Sitaram, Rice U., 1991, 1999 -\def\slatexversion{2.4z2} +\def\slatexversion{20050609} % last modified % This file (or a soft link to it) should be in some % directory in your TEXINPUTS path (i.e., the one @@ -551,7 +551,12 @@ \catcode`\@12 \global\let\atsign@% \endgroup -\chardef\dq=`\" +%\chardef\dq=`\" +\ifusinglatex +\def\dq{\ttfamily\char`\"}% +\else +\def\dq{\tt\char`\"}% +\fi % leading character of slatex filenames: . for unix to % keep them out of the way