Am 11.01.2011 um 11:55 schrieb Hellmut Weber:

> Hi list,
> 
> Given a little python-Skript fipwdcut
> ...
> and a LaTeX macro \pwdstring
> 
> ------------------------
> newcommand{\pwdstring}[1]{
>  \immediate\write18{/home/H_Bin/fipwdcut #1 >/tmp/shell.escape}
>  \input{/tmp/shell.escape}
>  }
> ------------------------
> 
> I have defined aliases for latex and pdflatex
> 
> ------------------------
> l...@sylhepta H_Bin $ alias
> alias latex='latex -shell-escape'
> alias pdflatex='pdflatex -shell-escape'
> --------------------
> 
> hoping that pdflatex-ing a document with an ERT \pwdstring{4} at the end
> would show me the end part of the path to the directory the document was
> compiled in.

LyX doesn't resolve shell aliases like your shell does.

> (I know that I have to export my document as latex source and then to
> compile it again to get the correct directory ;-)
> 
> But Lyx refuses to do so and in the LaTeX protocoll I get the error message
> 
> ============================
> runsystem(/home/H_Bin/fipwdcut 4 >/tmp/shell.escape)...disabled
> (restricted).
> ! LaTeX Error: File `/tmp/shell.escape' not found.
> ============================
> 
> I tried to activate the shell-escape option of the pdflatex command in
> the converters dialog for 'latex (pdflatex) -> PDF (pdflatex)' changing
> the additional flags to 'shell-escape' but this produces the same error
> message as before.

Did you use 'shell-escape' or '-shell-escape'?

Stephan

Reply via email to