?SPAM? - Re: [texhax] choice of documentstyle upon \jobname
P.Taylor at Rhul.Ac.Uk
Thu Dec 1 13:15:18 CET 2005
Reinhard Kotucha wrote:
> A very simple solution is this:
> Remove the \documentclass stuff completely from the file. Assume this
> file is called paper.tex.
> Then prepare other files:
> The main advantage of this approach is that it is easy to understand,
> even in a few years. And it's clean LaTeX.
There's even an approach which /does/ allow \jobname to be
used without the need to get into catcodes and the difference
between an expandable token (\jobname) and a macro (\thisname).
Let the projects live in a directory "P". Create sub-directories
of "P" called <whatever>, one for each possible value of \jobname.
Create one-line include files, one in each sub-directory,
called (e.g.,) "DocClass.tex". Each should contain a single
line of the form
where <options> and <class> are as required for that specific
value of \jobname.
Each main file in "P" will then start with the line
and each will therefore \input as the very first record
where both <options> and <class> are a function of the jobname.
Clear as mud ?! :-)
More information about the texhax