Article View: comp.text.tex
Article #9526Different versions of the same file: a simple TeXnique
From: Timothy Murphy
Date: Wed, 23 Dec 1992 19:08
Date: Wed, 23 Dec 1992 19:08
49 lines
1773 bytes
1773 bytes
The following technique is widely used in Metafont,
but I haven't seen it mentioned in connection with TeX/LaTeX,
though it seems to me it may sometimes be useful.
(If everybody except me has been using this trick for years,
please ignore the posting!)
Let me give an example.
Here is the beginning of a LaTeX file vi.tex:
===========================================
\ifx\TCDarms\undefined
%% Non-PostScript version
\documentstyle[12pt,a4]{article}
\title{Vi for beginners}
\else
%% PostScript version with college arms
\documentstyle[epsf,12pt,a4]{article}
\title{
\vspace*{-4cm}
\epsfxsize=3cm\mbox{\epsffile{/usr/local/lib/tex/inputs/Local/tcdarms.pss}}\\[5mm]
Vi for beginners}
\fi
===========================================
Now if I want to latex this with our college arms, I say
% latex "\def\TCDarms{}\input vi"
If I want to latex it without the arms I just say
% latex vi
This ruse might be useful if one wanted different versions of a file
according to the printer in use,
eg a PostScript printer incorporating PS graphics
agains a non-PostScript printer.
Or if one wanted to send away a file
with some locally defined logo on it.
Just a thought ...
--
Timothy Murphy
e-mail: tim@maths.tcd.ie
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Technical Details
Message-ID:
<1992Dec23.190843.27853@maths.tcd.ie>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!ieunet!tcdcs!maths.tcd.ie!timShow Full Headers
Complete Article Headers
Newsgroups: comp.text.tex Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!ieunet!tcdcs!maths.tcd.ie!tim From: tim@maths.tcd.ie (Timothy Murphy) Subject: Different versions of the same file: a simple TeXnique Message-ID: <1992Dec23.190843.27853@maths.tcd.ie> Summary: Changes without changes ... Keywords: LaTeX printing Organization: Dept. of Maths, Trinity College, Dublin, Ireland. Date: Wed, 23 Dec 1992 19:08:43 GMT Lines: 49