Sonntag, 1. Juni 2014

Latex write to a external file

To write to another text file in the latex document (FILE) you have to open it at the begin of the document and close it at the end of the document, like explained in the following:
\AtBeginDocument{%
  \Opensolutionfile{FILE}
}

\AtEndDocument{%
  \Closesolutionfile{FILE}
}

One can write to this file by using the following command:
\Writetofile{FILE}{text}

For example one could include the file at the end of the document by using:
  \IfFileExists{FILE.tex}{\input{FILE.tex}}{}

Keine Kommentare:

Kommentar veröffentlichen