[texhax] Passing Command Line Arguments to a Latex document

Oleg Katsitadze olegkat at gmail.com
Tue Jul 10 16:12:14 CEST 2007


On Tue, Jul 10, 2007 at 02:08:18PM +0100, Miriam.ORiordan wrote:
> I would like to know if it is possible to pass command line
> arguments to a Latex document.

Not really, but you can use the following hack (it is for plain TeX,
but I think it should work with LaTeX, too):

----------%<---------- test.tex ----------%<----------
\message{\jobname: \testparam}
\bye
----------%<---------- test.tex ----------%<----------

Then compile like this:

  $ tex '\def\testparam{This is a test parameter.}\input test.tex '

Best,
Oleg


More information about the texhax mailing list