Changes

Jump to navigation Jump to search
909 bytes added ,  16:33, 28 December 2006
How to check for write18
When write18 is turned on, it means that it's possible to execute external programs in the middle of a TeX run. This is required to make some modules such as those for R, lilypond, gnuplot, ... etc. to work properly, but may impose a security leak if you would be running TeX on a server with untrusted sources of TeX files, so it's turned off by default.
== How to turn on write18 ===== Windows - MikTeX ===
'''MikTeX 2.4'''
=== Linux/Mac ===
First try to figure out where your configuration file resides:
Change that "f" (false) to "t" (true) to enable it.
 
== How to check if write18 is turned on ==
Sometimes while writings a module, one needs to check if write18 is enabled or now. There are different ways in which this can be done.
 
* A new primitive in pdftex 1.30: <cmd>pdfshellescape</cmd> is a read-only integer that is 1 if <cmd>write18</cmd> is enabled, 0 otherwise.
* ConTeXt defines <cmd>systemcommandmode</cmd> that is 2 if <cmd>write18</cmd> is enabled, 1 otherwise.
* A primitive <cmd>ifeof18</cmd> that is <code>true</code> if <cmd>write18</cmd> is disabled, <code>false</code> otherwise.
 
<cmd>ifeof18</cmd> works with both pdfTeX and XeTeX, while <cmd>pdfshellescape</cmd> only works with pdfTeX.
 
Hans response on the mailing list
 
write 18 is a hack and pdfshellescape a sane replacement
 
in luatex it will probably be gone completely since there we have
 
<texcode>
\directlua 0 { os.execute("...") }
</texcode>

Navigation menu