[tex-live] writing kpsewhich output to a file

Ulrike Fischer news3 at nililand.de
Fri Apr 29 11:42:11 CEST 2016


When I compile this here **without** shell-escape (and an existing
blub.temp file)

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{shellesc}
%correct small bug in shellesc:
\protected\def\ShellEscape{\immediate\write18 }
\begin{document}

\ShellEscape{kpsewhich article.cls    >> blub.temp}

\immediate\write18{kpsewhich book.cls >> blub.temp}

\end{document}

I get messages that the command has been executed
runsystem(kpsewhich book.cls >> blub.temp)...executed safely
(allowed).

but blub.temp is empty. I get the pathes only when using
--shell-escape. Is this to be expected? 

(I see some arguments why such redirections are disallowed but
wonder how I can catch the argument. I asked the question on tex.sx:
http://tex.stackexchange.com/questions/306987/problem-with-writing-the-output-of-kpsewhich-to-a-file)


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



More information about the tex-live mailing list