[OS X TeX] Can someone please test this?

Herbert Schulz herbs at wideopenwest.com
Thu Apr 8 22:57:56 CEST 2010


On Apr 8, 2010, at 3:07 PM, Peter Dyballa wrote:

> 
> 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.
> 
> 

Howdy,

Yes, that was caught after the first time around and then I left out another `;' the second time around and finally got it right the third time around.

Unfortunately it appears that the asy run may be producing figure files that change in md5sum (or something) so that latexmk appears to think they changed on each run; that puts latexmk into an infinite loop (infinity = 6 for latexmk). No nice solution for that so the engine file now unconditionally does an initial run through pdflatex and asy and only uses latexmk for the final runs (to for bibtex, etc. and resolving cross-references). Not what I was hoping for. The asymkrc file is no longer needed since the last pdflatex run is now like the pdflatexmk engine.

> 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"
> 

What did you change here? In any case the engine file has been changed as in the last message with attachment.

> 
> 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

That can certainly be easily done by putting an echo line in the new engine file. The lack of any kind of feedback from asy certainly is a bit disconcerting but the ``dancing'' files on my desktop as it runs keeps me amused.

An updated version with the echo lines is attached:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: asymk.engine.zip
Type: application/zip
Size: 824 bytes
Desc: not available
URL: <http://tug.org/pipermail/macostex-archives/attachments/20100408/c209bf90/attachment.zip>
-------------- next part --------------


Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)





More information about the macostex-archives mailing list