[OS X TeX] LaTeXiT 1.4.1 beta

Ross Moore ross at ics.mq.edu.au
Wed Aug 17 00:39:19 CEST 2005

Hi Pierre,

On 17/08/2005, at 12:58 AM, Pierre Chatelier wrote:

> Thanks to a very recent idea, I made a first step for supporting  
> xelatex under LaTeXiT
> So here is a new beta of LaTeXiT, that can use xelatex (but  
> requires pdflatex anyway).

The best way to implement  XeTeX (or XeLaTeX) as the engine is to do  
1 pass
    xelatex  -no-pdf  <filename>

then one of

    xdv2pdf  -papersize=<width>,<height>  <filename>.xdv

Then remove any extraneous output files that are no longer needed.

This is less work than 2 calls to  xelatex
  (which makes the .xdv file anyway, then runs  xdv2pdf  and removes
   the .xdv file once the .pdf has been made)
or 1 call to  pdflatex  then 1 of  xelatex .

> Actually, only the composition process has been changed; for  
> instance, I do not use a different default preamble.

There are ways to test which engine is running the job:
   pdfTeX , XeTeX  or  TeX+dvips+Ghostscript .

One way is to have your preamble check for the engine and
load appropriate packages, or package-options, accordingly.

Alternatively, you could have different preambles for the
different engines, then program the LaTeXiT shell to select
the correct one according to which engine is requested.

There is another optimisation that can be made too.

In the example code that was posted here a few days ago,
the  LaTeXiT  job ended with:

\latexitheight,margin=0pt,left=0.000000 pt,top=0.000000 pt}

This forces a call to LaTeX's  \output  routine,
which tries to build a full page including headers
and footers --- totally redundant for LaTeXiT .

Alternatively, you can ditch the  geometry package altogether,
and use instead the \shipout primitive directly:

{\voffset=-1truein \hoffset=-1truein

Here we include support for 2 different engines,
assuming that \usepackage{ifpdf} is in the preamble.

Since there is nothing on the page, the \output routine
will exit quickly, leaving you with just the single page
produced by \shipout , sized correctly for its contents.

> Regards,
> Pierre

I hope these ideas help you to make a neat little program
even more efficient and effective.



Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>

More information about the macostex-archives mailing list