[OS X TeX] Optimal Solution for an asymptotemk engine

Berend Hasselman bhh at xs4all.nl
Fri Apr 9 13:27:26 EDT 2010


On 09-04-2010, at 18:51, Herbert Schulz wrote:

> Howdy,
> 
> John Collins, the maintainer of latexmk, just came up with a magic (as far as I'm concerned) solution for automatically compiling a file that uses asymptote without any extra runs of asy and still runs the optimal number of times (also running bibtex/makeindex, etc.). While I understand what he has done I certainly don't understand exactly why it works.
> 
> Take the asymptotemkrc file and place it in ~/Library/TeXShop/bin/tslatexmk/. Take the asymptotemk.engine file and place it in ~/Library/TeXShop/Engines/. Restart TeXShop so it ``knows'' about the asymptotemk engine. Place the line
> 
> % !TEX TS-program = asymptotemk
> 
> and typeset. No extra runs of asy (a great time waster) or compiles when nothing has changed.
> 
> John Collins really knows latexmk inside out so I really appreciate his active help in this.
> 
> <AsymptotemkEngine.zip>
> 
> Oh... once you are convinced that the asymptotemk engine works remove the asymk engine if you were testing it.

I tested this with the example provided by Jean-Claude DE SOZA.
It seems to work nicely but there was one figure that asymptote did not produce (figure 7).
The asy code for that figure needed a module geometry_dev which I don't have available.
Even though a final pdf was generated for the document as a whole, TeXShop was not showing it since Latexmk detected an error.

After commenting out the lines starting at the \begin{figure} to the corresponding \end for that figure (starts near or at line 93),
the example file compiled perfectly.

Made a small change and latexmk processed the whole thing in a flash.

Very nice.

Berend


More information about the MacOSX-TeX mailing list