[texhax] filecontents in own environment
Arno.Trautmann at gmx.de
Wed May 25 13:06:52 CEST 2011
Susan Dittmar wrote:
> Dear Arno,
> I do not understand what exactly you want to archieve. Perhaps you could
> elaborate a bit upon that?
I want to include a LaTeX example that is generated on-the-fly, called
from another document. I.e. the source code is located in the main file,
written into the external file via filecontents, then compiled with a
\write18 and the resulting pdf is included.
> What you did, as far as I understand your code snippet, cannot work.
> You cannot mix the filecontents environment and an \include command.
Sorry, that should have been an \includegraphics …
> impossible, because the filecontents environment *must* be in the preamble,
Nop, must not – the filecontents package allows to use it anywhere, and
that works fine so far.
The code attached below does what I want, but I'd like to have a
shorthand for it, so I can collapse the code between the —¹— and —²— into
Sorry for being not so clear …
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 262 bytes
Desc: OpenPGP digital signature
More information about the texhax