X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1922" "Fri" "13" "June" "1997" "12:24:38" "+0200" "Hans Aberg" "haberg@MATEMATIK.SU.SE" nil "44" "Document on several files" "^Date:" nil nil "6" nil nil nil nil nil] nil) Received: from listserv.gmd.de (listserv.gmd.de [192.88.97.1]) by mail.Uni-Mainz.DE (8.8.5/8.8.4) with ESMTP id TAA14301; Fri, 13 Jun 1997 19:00:17 +0200 (MET DST) Received: from lsv1.listserv.gmd.de by listserv.gmd.de (LSMTP for OpenVMS v1.1a) with SMTP id <11.A895C289@listserv.gmd.de>; Fri, 13 Jun 1997 18:54:17 +0200 Received: from RELAY.URZ.UNI-HEIDELBERG.DE by RELAY.URZ.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8b) with spool id 152384 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Fri, 13 Jun 1997 12:23:43 +0200 Received: from mail.nada.kth.se (root@mail.nada.kth.se [130.237.222.92]) by relay.urz.uni-heidelberg.de (8.7.6/8.7.4) with ESMTP id MAA28902 for ; Fri, 13 Jun 1997 12:23:42 +0200 (MET DST) Received: from [130.237.37.51] (sl70.modempool.kth.se [130.237.37.96]) by mail.nada.kth.se (8.8.4/8.8.4) with SMTP id MAA23112 for ; Fri, 13 Jun 1997 12:23:27 +0200 (MET DST) X-Sender: su95-hab@mail.nada.kth.se Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-ID: Reply-To: Mailing list for the LaTeX3 project Date: Fri, 13 Jun 1997 12:24:38 +0200 From: Hans Aberg Sender: Mailing list for the LaTeX3 project To: Multiple recipients of list LATEX-L Subject: Document on several files Status: R X-Status: X-Keywords: X-UID: 2028 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.