Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help with using shell escape

299 views
Skip to first unread message

Tariq

unread,
Feb 25, 2009, 4:33:49 PM2/25/09
to
Hi everyone,

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 %%%%%%

Will Robertson

unread,
Feb 25, 2009, 9:55:25 PM2/25/09
to
On 2009-02-26 08:03:49 +1030, Tariq <tariq....@gmail.com> said:

> 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

Tariq

unread,
Feb 25, 2009, 10:03:14 PM2/25/09
to
On Feb 25, 9:55 pm, Will Robertson <wsp...@gmail.com> wrote:

> 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

T3X

unread,
Feb 26, 2009, 8:53:30 AM2/26/09
to
On Feb 26, 3:03 am, Tariq <tariq.per...@gmail.com> wrote:
> Thank you very much for timely help. Your suggestion worked great. I
> had been trying
>
> pdflatex --enable-write18
>
> but that did not work.

Because this is MiKTeX specific option. Use --shell-escape for TeX
Live.

Cheers,

Tomek

0 new messages