[OS X TeX] PDF Sync and different fonts/encodings?

Morten Høgholm morten.hoegholm at gmail.com
Mon Feb 6 19:54:35 CET 2006


On Mon, 06 Feb 2006 10:34:46 +0100, Frank STENGEL <fstengel at mac.com> wrote:

> This said, there does not seem to be any way of reversing this patching  
> of \@@par (something in the line of a \let\@@par\PDFSYNC at par when one  
> wants to revert to the state before using pdfsync). In the same chain of  
> ideas, the patching of \everymath, \everyhbox, erases anything that was  
> in these token lists before. Why not have something like
>
> \expandafter\expandafter\everymath\expandafter{\pdfSyncStyff\the 
> \everymath}
>
> when patching \everymath? (sorry for the \expandafters, but they seem  
> necessary...)

Careful, the above will most likely lead to an error like
   ! TeX capacity exceeded, sorry [input stack size=5000].

What we want here is to insert \@PDFSYNC unexpanded into \everymath while  
making sure we do not get an infinite loop with \everymath calling itself.  
Hence the above code should be
   \expandafter\everymath\expandafter{\expandafter\@PDFSYNC\the\everymath}

\begin{texnote}
Token registers like \everymath take an optional <filler text> which may  
appear before the mandatory {. Hence you can cheat and omit the first  
\expandafter and simply write
   \everymath\expandafter{\expandafter\@PDFSYNC\the\everymath}
Not of much use here but nice if you for instance wanted to make a global  
assignment to \everymath, where \@PDFSYNC was expanded once (or maybe even  
twice).

Yes, TeX's syntax rules are plenty and sometimes a little weird... :-)
\end{texnote}
-- 
Morten
------------------------- 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 Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list