I am using the following to try the shell escape. I am running
TeXLive2007 under Ubuntu and use Emacs as editor. I got this file from
somewhere (do not remember where). When I compile with pdflatex, I get
the following error:
Package epstopdf Warning: Shell escape feature is not enabled.
No file Shell_EscapeTest.aux.
\write18 DISABLED
! LaTeX Error: File `write18.out' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: out)
Enter file name:
I am confused, I thought that the shell escape will get enabled during
the compilation. Could someone please help me sort out where the
problem might be? I would appreciate. Regards,
Tariq
%%%%% Shell escape test file %%%%%%%%%%%%%%
\documentclass{article}
\begingroup
\expandafter\ifx\csname pdfshellescape\endcsname\relax
\else
\ifnum\pdfshellescape>0 %
\else
\PackageWarningNoLine{epstopdf}{%
Shell escape feature is not enabled%
}%
\fi
\fi
\endgroup
\begin{document}
Look for the output of shell escape in the terminal output.
\immediate\write18{ls -l | wc > file_list.out}
\IfFileExists{file_list.out}{\message{\string\write18 ENABLED}}
{\message{\string\write18 DISABLED}}
%\input{file_list.out}
\immediate\write18{grep -i meanings test.tex | wc > write18.out}
\input{write18.out}
\end{document}
%%%% End of file %%%%%%
> I am confused, I thought that the shell escape will get enabled during
> the compilation. Could someone please help me sort out where the
> problem might be?
You need to enable it manually however you're compiling your source
pdflatex -shell-escape
You might need to specify it manually in AucTeX, not really sure.
Someone else on the internet says they use:
%%% Local variables:
%%% mode: LaTeX
%%% LaTeX-command: "latex -shell-escape"
%%% TeX-master: t
%%% End:
A pity there isn't a menu option or anything.
Will
> You need to enable it manually however you're compiling your source
>
> pdflatex -shell-escape
>
> You might need to specify it manually in AucTeX, not really sure.
> Someone else on the internet says they use:
>
> %%% Local variables:
> %%% mode: LaTeX
> %%% LaTeX-command: "latex -shell-escape"
> %%% TeX-master: t
> %%% End:
>
> A pity there isn't a menu option or anything.
Will
Thank you very much for timely help. Your suggestion worked great. I
had been trying
pdflatex --enable-write18
but that did not work.
Perhaps someone else can suggest a possible solution via AucTeX.
Regards,
Tariq
Because this is MiKTeX specific option. Use --shell-escape for TeX
Live.
Cheers,
Tomek