CERN Accelerating science

This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.



next up previous
Next: Preamble commands Up: LaTeXeAn Overview Previous: Initial and preamble

Initial commands

\NeedsTeXFormat{format-name}[release-date]

This command, which is normally present in package and class files, can also be useful in user documents to make sure that the file is run with LaTeXe. Users who try to run it with LaTeX 2.09 or plain TeX will get a reasonably clear error message. An example is

\NeedsTeXFormat{LaTeX2e}[1994/02/01]

If you want to make sure that your document can be processed at another site, it could make sense to include all packages and files that your document needs together with the main file. LaTeXe provides the following syntax to facilitate this

\begin{filecontents}{file-name}
<file-contents>
\end{filecontents}

When your document file is run through LaTeXe the body of each filecontents environment is written verbatim to a file whose name is given as the argument file-name. If a file with such a name already exists in any of the directories ``visible'' to TeX, only an informative message is given, the body of the environment is by-passed, and the file is not replaced.



Janne Saarela
Wed May 17 14:38:58 METDST 1995