## LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

Subject:

Document on several files

From:

Date:

Fri, 13 Jun 1997 12:24:38 +0200

Content-Type:

text/plain

Parts/Attachments:

 text/plain (44 lines)
   On this discussion on combining several documents into one, I use a variation of having a single document on several files, that might be related:   LaTeX suggests you split a large document by having a file Main.tex that inputs or includes several other files; by fiddling around with these inputs, one can strip down the document to be small while typing on a particular input file.   I found this inconvenient, so instead I put all preamble stuff, up to and including the \begin{document} command, in a file Begin.tex, and the \end{document} command is put into a file End.tex. In addition these files Begin.tex and End.tex contain commands so that they are not being read twice. Then each input file, including Main.tex, looks as follows     \input Begin       ... % File contents     \input End   With this setup, I can compile each input file separately, and I do not have to fiddle around with the inputs in the file Main (when I compile Main, I get the whole document typeset).   I have to do some manipulations with LaTeX basic commands, in order to get the global auxiliary files properly read while typesetting form an input file, but I think this is not very complicated (I use a .sty file for this).   In addition, I found it useful to split up the Begin files into two parts, one that contains what might be used to create a format in a \dump, and one containing the rest, the stuff you might change while typing your document.   So I arrive at the following suggestion for LaTeX3:   If a file starts with the command \project{Foo}, then first, if the format Foo is undefined the file Foo.format is read; then the file Foo.begin is read, after that the file contents is processed, and finally, when the file has been closed, the file Foo.end is read.   One can then use this set-up to create the effects above.   Hans Aberg P.S. Why is \include doing a newpage? I find this inconvenient.