On Thu, Jul 10, 2003 at 10:05:25PM +0200, Olaf Weber wrote:
Martin Schroeder writes:
On 2003-07-10 15:49:50 +0200, Heiko Oberdiek wrote:
On Thu, Jul 10, 2003 at 02:57:25PM +0200, Martin Schroeder wrote:
On 2003-07-10 14:35:48 +0200, Martin Schröder wrote:
- New readonly primitive \pdfshellescape which can be used to test if the
Thinking further (and being reminded by Rolf): Is there a reason why this can _not_ be called \shellescape? It's got nothing to do with pdf (and would be usefull in all web2c-based TeX engines, no matter what they are called).
\write18 is a property of web2c-based TeX engines, so \shellescape is the better name and it would be even better, if this can be added to the other web2c-based TeX engines, too.
Same here. Olaf? Or does this belong to tex-implementors?
\shellescape sits in Knuth's namespace.
This seems to have come up private mail as well, and there the suggestion was to use \ifeof18 instead.
For various reasons I still haven't been able to spend time on TeX. :-(
Ok, I have done it:
Patch ShellEscapeIfeof18
Packages such as pdftricks.sty, epstopdf.sty (or pdftex.def)
call external programs. They do not work at all, if the
\write18 feature is not enabled. Therefore a robust method
would be useful in order to inform the user. For security
reasons the \write18 feature must not be set by TeX macro
code.
In opposite to patch "ShellEscape" this patch now uses
\ifeof18 for a test of the shell escape feature. Thus the
introduction of a new primitive is avoided. Also it works
now for other TeX engines (tex, etex, pdftex, pdfetex).
Use, for instance:
\ifeof18
\message{The \string\write18 feature is disabled.}
\else
\message{The \string\write18 feature is enabled.}
\fi
Patch files based on 2003/07/11 v1.11a:
tex.ch.diff for TeX/texk/web2c/tex.ch
Attachted are files tex.ch.diff and a test file test.tex.
Yours sincerely
Heiko