Thank you! I did not know about that package, but that seems like a more appropriate solution.
// Sven
Den torsdag 13 juli 2017 kl. 16:32:04 UTC+2 skrev Ulrike Fischer:
Am Wed, 12 Jul 2017 13:43:54 +0200 schrieb John MacFarlane:
> I can modify the LaTeX reader so it handles this special
> case better. (A LaTeX control sequence must be a sequence
> of letters -- here the '18' specifies a file handle, I
> think.)
>
> In the mean time, try defining a macro synonym:
>
> \newcommand{\mywrite}[1]{\write18{#1}}
>
> and then use `\mywrite`.
There is no need for an own command. Load the shellesc package and
use
\ShellEscape and \DelayedShellEscape
instead of \immediate\write18 and \write18 -- it is recommended
anyway as it has the benefit to also work with luatex where \write18
no longer exists.
--
Ulrike Fischer
http://www.troubleshooting-tex.de/