[OS X TeX] Can someone please test this?

Peter Dyballa Peter_Dyballa at Web.DE
Thu Apr 8 16:07:46 EDT 2010


Am 08.04.2010 um 18:44 schrieb Jean-Claude DE SOZA:

> sh: -c: line 0: syntax error near unexpected token `fi'
> sh: -c: line 0: `pdflatex --shell-escape --synctex=1 --file-line- 
> error  "asym.tex"; if [ -e "asym".asy ] then asy "asym".asy;  
> pdflatex --shell-escape --synctex=1 --file-line-error  "asym.tex"; fi'


The bug seems to be this line in asymkrc:

	$pdflatex = "pdflatex $TSUserCompileOptions --synctex=1 --file-line- 
error %O %S; if [ -e %B.asy ] then asy %B.asy; pdflatex  
$TSUserCompileOptions --synctex=1 --file-line-error %O %S; fi";

Syntactically OK would be this:

	$pdflatex = "pdflatex $TSUserCompileOptions --synctex=1 --file-line- 
error %O %S; if [ -e %B.asy ]; then asy %B.asy; pdflatex  
$TSUserCompileOptions --synctex=1 --file-line-error %O %S; fi";

Because the man page tells:

       if list; then list; [ elif list; then list; ] ... [ else  
list; ] fi

so a ``;´´ needs to be added between ``]´´ and ``then´´. With this  
update it works for me.


BTW, Herb, you could write the ENGINE file also this way:

#!/bin/bash
export LTMKEDIT="$HOME/Library/TeXShop/bin"
export    TSBIN="$LTMKEDIT/tslatexmk"
export  LTMKBIN="$LTMKEDIT/tslatexmk"
# make sure latexmkrcedit exists in bin
if [ ! -e "${LTMKEDIT}/latexmkrcedit" ] ; then
	cp "${LTMKBIN}/latexmkrcDONTedit" "${LTMKEDIT}/latexmkrcedit"
fi
"${LTMKBIN}"/latexmk -pdf -r "${LTMKEDIT}/latexmkrcedit" -r "${TSBIN}/ 
asymkrc" "$1"


And I have one wish! Because Asymptote can take a long time  
"initialising" a long time nothing happens in TeXShop's console, so  
one could start thinking that a fault had happened. It would be nice  
if at least a notice would be output that now asy was launched and  
keeps running and in a few minutes the user would see some progress...

--
Greetings

  Pete
                      ~  o
                       ~_\\_/\
                      ~  O   O




More information about the MacOSX-TeX mailing list