# [tex-live] shell_escape extension patch

Taco Hoekwater taco at elvenkind.com
Sat Sep 29 15:33:32 CEST 2007

Hi Ivo,

ivo welch wrote:
>
> of course, if this could be done in tex itself, my solution would be
> stupid.  is it?
>
> What do you think?  Is this feasible?  Useful?   For non-TeXies, it
> would be almost equivalent to a broader namespace w/o having to change
> anything in the core latex system.

This is a very, very hard problem to solve in normal tex with macros,
so re-defining \begin{document} and using an external preprocessor like
you proposed may be the only option. And because of the hackishness
of that, I have never attempted to do something along these lines in
the past.

In Omega (Aleph) it should in principle be possible to do this using
input translations but I have no idea how to go about that in practice.
In luatex this could be done by adjusting the line buffer via a lua
callback relatively easily, but luatex is far from production-ready
at the moment.

Right now, the perl road may the most feasible way to do what you want.

> Second question---perltex currently is incredibly slow because it is
> constantly polling for the appearance of files.  How feasible would it
> be to improve the signaling mechanism so that it is without penalty
> when there is no perl in the code?  (perhaps this is unimportant
> because luatex may fill much of perltex's need.)

I assume perltex could use a pipe to read from the perl command, using