[OS X TeX] XeLaTeXify engine in TeXShop

Herbert Schulz herbs at wideopenwest.com
Mon Feb 8 21:55:54 CET 2010


On Feb 8, 2010, at 11:49 AM, Jung-Tsung Shen wrote:

> I modified the existing TeXify engine (copied from Herb's post long
> ago) in my TeXShop to use XeLaTeX, but it failed. The modification was
> done in the most naive way: changing latex to xelatex ... Can someone
> take a look and let me know what's the right way to do this?
> 
> Thanks in advance.
> 
> JT
> 
> *****
> 
> #!/bin/sh
> location=$(dirname "$1")
> basefname=$(basename "$1" .tex)
> xelatex -interaction=batchmode "${basefname}"
> if [ -e "${basefname}.dvi" ] ; then
>         bibtex "${basefname}"
>         xelatex -interaction=batchmode "${basefname}"
>        xelatex -interaction=batchmode "${basefname}"
>       dvips -o "${basefname}.ps" "${basefname}"
> fi
> if [ -e "${basefname}.ps" ] ; then
>        ps2pdf13 -dAutoRotatePages=/None "${basefname}.ps"
> fi
> # /bin/rm "${basefname}.dvi" "${basefname}.log" "${basefname}.aux"
> "${basefname}.ps"

Howdy,

This will fail because xelatex has its own back end (xdvipdfmx) that is run automatically and does all of the work of dvips and ps2pdf13. Don't use this any more! 

This is a very old engine and really has been completely overtaken by the latexmk engines which use the perl script latexmk to automatically run bibtex and/or maekindex, and (pdf/xe)latex the proper number of times to resolve all cross-references, etc. Move the engine files from ~/Library/TeXShop/Engines/Inactive/Latexmk/ two directories up, to ~/Library/TeXShop/Engines/ to activate them. Once that is done restart TeXTShop.

To use the xelatexmk engine simply put the line

% !TEX TS-program = xelatexmk

at the top of the source file. There is more information in the documentation in ~/Library/TeXShop/Engines/Inactive/Latexmk/.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the macostex-archives mailing list