[texhax] passing package options on the commandline

Lim Lian Tze liantze at gmail.com
Thu Jan 3 14:34:46 CET 2013


Combining Lars' and Susan's solutions, you can do this from the command
line:

pdflatex --jobname=draft "\PassOptionsToPackage{draft}{**
graphicx}\input{TrueDocument}"

or

pdflatex --jobname=final "\PassOptionsToPackage{final}{**
graphicx}\input{TrueDocument}"

You could wrap this up in a Makefile if you like.

- LianTze LIM -
http://liantze.penguinattack.org/


On Thu, Jan 3, 2013 at 9:15 PM, Susan Dittmar <Susan.Dittmar at gmx.de> wrote:

> jtzzaa11-texhax2 at yahoo.com schrieb:
>
>  Specifically, I want to generate a document version where figures are
>> replaced by rectangles. This is achieved with the "draft" option in the
>> graphicx package.
>>
>
> What I do in this case is create a wrapper document with just those two
> lines (if TrueDocument.tex is the name of your main latex file):
>
> ======= draft.tex =======
> \PassOptionsToPackage{draft}{**graphicx}
> \input{TrueDocument}
> =======
>
> Another for the final version:
> ======= final.tex =======
> \PassOptionsToPackage{final}{**graphicx}
> \input{TrueDocument}
> =======
>
> Now you only need to call
> pdflatex draft
> to create the draft version and
> pdflatex final
> to create the final version.
>
> This has the advantage (in this case unimportant, but in others it might
>  matter) that the auxiliary files for the different versions are kept
> apart, so table of contents matches the contents and not the contents of
> the other version...
>
> Hope that helps,
>
>         Susan
>
> ______________________________**_________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/**texhax/<http://tug.org/pipermail/texhax/>
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/**
> listinfo/texhax <http://tug.org/mailman/listinfo/texhax>
> Human mailing list managers: postmaster at tug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20130103/c2bcc86d/attachment.html>


More information about the texhax mailing list