From Wiki
Revision as of 20:02, 8 August 2009 by Wolfgang Schuster (talk | contribs) (New interface for messages)
Jump to navigation Jump to search

LaTeX provides a filecontent environment to embed text in your document which is written to a external document when your process it. The filename is given with the argument for the environment.

You could define a environment for the same effect with the buffer mechanism, the code for such a environment is:


\definemessageconstant {filecontents}

\startinterface all
  \setinterfacemessage{filecontents}{1}    {Overwriting file --}
  \setinterfacemessage{filecontents}{2}    {Writing file --}


   \aftersplitstring #1\at.\to\extension



You could use this environment in your document in the following way.

If I could choose my paradise,
    And please myself with choice of bliss,
Then I would have your soft blue eyes
    And rosy little mouth to kiss!
Your lips, as smooth and tender, child,
As rose-leaves in a coppice wild.

If fate bade choose some sweet unrest,
    To weave my troubled life a snare,
Then I would say "her maiden breast
    And golden ripple of her hair;"
And weep amid those tresses, child,
Contented to be thus beguiled.

            (Thomas Asche - No and Yes)