[OS X TeX] bibtex <filename>.rsp

Frank STENGEL fstengel at mac.com
Sun Mar 26 06:55:28 EST 2006


Le 24 mars 06 à 20:22, Rechtsanwalt Friedrich Vosberg a écrit :

> Thanks a lot, but I've an additional question:
>
> I use a class that prints DRAFT or COPY in the background of each  
> sheet depending of an input (D, C) while the latex run. If the  
> input is 0 it prints no word into the background of the sheets.
>
>   ...
>   \typein[\modus]{Which Version (0, 1, 2 or 3 only)?}
>   \ifcase\modus\or
>   \AddToShipoutPicture{%
>     ...
>
> But the script needs the input at *each* latex run. So I have to  
> make the *same* input at *three* times while running your engine to  
> get a draft, a copy or the original.

One idea, while a bit clumsy would involve writing the information to  
the auxilliary file and re-use it afterwards. The code could look like

===8<===
\makeatletter
\newcount\modusValue
\modusValue=-1
\def\askInfo{%
\ifnum\modusValue<0\relax%
   \typein[\modus]{Which Version (0, 1, 2 or 3 only)?}%
   \modusValue=\modus\relax%
\fi % \ifnum
\immediate\write\@auxout{\global\modusValue=\the\modusValue}
\ifcase\the\modusValue\or% etc
   % ....
\fi % \ifcase
}
\makeatother
===8<===

To reset the mode, simply trash the .aux file... I did't fully test  
it, but it seems to do the trick. Speaking of which, is there a  
proper way to write to the .aux file without having to use a LaTeX  
internal (\@auxout)?

In the hope this helps...

-- 
Frank STENGEL (fstengel<at>mac.com)

------------------------- 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 MacOSX-TeX mailing list