[texworks] Setting Typeset Preferences in head of preamble in document

Paul A Norman paul.a.norman at gmail.com
Mon Feb 28 11:32:58 CET 2011


Hi,

Been used to setting my typesetting runtime preferences in the Edit
Preferences under Typesetting tab and processing tools

Just found out (under MiKTeX at least) that the very top of a .tex
(pdflatex) document can receive pdflatex typesetting switches, like
changing the output name
(http://www.latex-community.org/forum/viewtopic.php?f=5&t=3021&st=0&sk=t&sd=a&start=0#p11886)

If its mentioned in our Tw manual I missed it so far, but this seems
pretty useful.

You seem to need to place these above the normal template' suggested
top two lines

% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode


List of qavailabel switches:
http://docs.miktex.org/manual/pdftex.html

Not sure yet whether these can be combined on one line.

This one lets you set a different output name when you need one (like
when using pdfpages package):

%& --job-name=Light-Works-A5.pdf
of for e.g.
%& --job-name=Light-Works-A4.pdf

(Obviously sync is not available with a different output name?)

Seems a safer place to use

%&  --enable-write18
or
%& --restrict-write18
  and
%&  --enable-pipes

rather than bulk setting in Tw Preferences.

There is even a -

%&--disable-pipes
  and
%&--disable-write18

available.

Presume this is distribution specific e.g.  TeXLive would handle this
differently -- or is this a general pdflatex wide thing?

Paul


More information about the texworks mailing list