Received: from webgate.proteosys.de (mail.proteosys-ag.com [62.225.9.49]) by lucy.proteosys (8.11.0/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id f7UAes929720 for ; Thu, 30 Aug 2001 12:40:54 +0200 Received: by webgate.proteosys.de (8.11.4/8.11.0) with ESMTP id f7UAerT13545 . for ; Thu, 30 Aug 2001 12:40:53 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C13140.3E8A3F00" Received: from mail.Uni-Mainz.DE (mailserver1.zdv.Uni-Mainz.DE [134.93.8.30]) by mailgate1.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f7UAeqG13957 for ; Thu, 30 Aug 2001 12:40:52 +0200 (MET DST) Received: from mailgate2.zdv.Uni-Mainz.DE (mailgate2.zdv.Uni-Mainz.DE [134.93.8.57]) by mail.Uni-Mainz.DE (8.9.3/8.9.3) with ESMTP id MAA12444 for ; Thu, 30 Aug 2001 12:40:51 +0200 (MEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by mailgate2.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f7UAepJ04292 for ; Thu, 30 Aug 2001 12:40:51 +0200 (MET DST) Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.27]) by relay.uni-heidelberg.de (8.10.2+Sun/8.10.2) with ESMTP id f7UAdlb21439; Thu, 30 Aug 2001 12:39:47 +0200 (MET DST) Received: from listserv (listserv.uni-heidelberg.de [129.206.100.27]) by listserv.uni-heidelberg.de (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id f7UAbSo31593; Thu, 30 Aug 2001 12:37:28 +0200 Received: from LISTSERV.UNI-HEIDELBERG.DE by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8d) with spool id 0473 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 30 Aug 2001 12:32:48 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id f7UAWmo31563 for ; Thu, 30 Aug 2001 12:32:48 +0200 Received: from tninet.se (lennier.tninet.se [195.100.94.105]) by relay.uni-heidelberg.de (8.10.2+Sun/8.10.2) with ESMTP id f7UAXVb20413 for ; Thu, 30 Aug 2001 12:33:31 +0200 (MET DST) Received: from [195.100.226.133] (du133-226.ppp.su-anst.tninet.se [195.100.226.133]) by lennier.tninet.se (BLUETAIL Mail Robustifier 2.2.2) with ESMTP id 508869.167609.999lennier-s2 for ; Thu, 30 Aug 2001 12:33:29 +0200 In-Reply-To: <15201.23735.553563.824181@istrati.zdv.uni-mainz.de> Return-Path: X-Sender: haberg@pop.matematik.su.se (Unverified) Content-class: urn:content-classes:message Subject: Compiling from several files Date: Thu, 30 Aug 2001 11:31:49 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Hans Aberg" Sender: "Mailing list for the LaTeX3 project" To: Reply-To: "Mailing list for the LaTeX3 project" Status: R X-Status: X-Keywords: X-UID: 4144 This is a multi-part message in MIME format. ------_=_NextPart_001_01C13140.3E8A3F00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I make use of a feature that in a project that consists of several files allows me to compile each LaTeX file individually, thus saving some compilation time while writing the manuscript. I think such a system = might be useful for inclusion in LaTeX3. One way to view it is as a workaround for LaTeX's Pascal preamble style: = If this preamble declaration style is dropped from LaTeX (replaced by a = more OO system admitting local definitions), perhaps this feature I suggest would not be needed. So I use two files, "begin.tex" and "end.tex", and each text part file = with in the project contains: \input begin ... % Text \input end The files "begin.tex" and "end.tex" look as follows (with some example = user code): ------------------------------------------------------------- % File begin.tex: % \ifx\beginned\relax\message{file already read.}% \let\rebeginned\relax\let\mayendfileinput\endinput% \else\global\let\beginned\relax\let\mayendfileinput\relax\fi % \mayendfileinput % End or not end file input, as set above. % % Add user commands here below: \documentclass[leqno]{article} \usepackage{color} \usepackage{hyperref} % AMS Fonts Package \usepackage{amssymb} \usepackage{amscal} % Use AMS calligraphic instead of TeX. % AMS LaTeX Package \usepackage{amsmath} \usepackage{amscd} \usepackage{rsfs} % Use RSFS to define \mathscr \usepackage{abergmath} %\input hyphenations % Hyphenation file %\input definitions % Definitions file \begin{document} % EOF begin.tex --------------------------------------------------------------- % File end.tex: \ifx\rebeginned\relax\message{file: Not yet.}% \let\rebeginned\undefined\let\mayendfileinput\endinput% \else\message{file: Now.}\let\mayendfileinput\relax\fi % \mayendfileinput % End or not end file input, as set above. % % Add user commands here below: \end{document} %\end % EOF end.tex --------------------------------------------------------------- If one use the stuff above, then if say main.tex contains \input chapter1 \input chapter2 ... and all files, main.tex, chapter1, ..., contain the \input begin ... % text \input end pair, then the user defined commands of this pair will only be read = once, so it becomes possible to compile each chapter1.tex, ... individually. However, LaTeX will be confused when later compiling main.tex because of multiply defined labels (but only on the level of warnings, I think). The idea would be to somehow integrate such a system into LaTeX, so that = it works correctly with respect to labels, perhaps with a \begin{...} ... \end{...} pair replacing the \input being ... \input end stuff. Hans Aberg ------_=_NextPart_001_01C13140.3E8A3F00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Compiling from several files

I make use of a feature that in a project that = consists of several files
allows me to compile each LaTeX file individually, = thus saving some
compilation time while writing the manuscript. I = think such a system might
be useful for inclusion in LaTeX3.

One way to view it is as a workaround for LaTeX's = Pascal preamble style: If
this preamble declaration style is dropped from LaTeX = (replaced by a more
OO system admitting local definitions), perhaps this = feature I suggest
would not be needed.

So I use two files, "begin.tex" and = "end.tex", and each text part file with
in the project contains:
  \input begin
  ...  % Text
  \input end

The files "begin.tex" and = "end.tex" look as follows (with some example user
code):
-------------------------------------------------------------
% File begin.tex:
%
\ifx\beginned\relax\message{file already = read.}%
\let\rebeginned\relax\let\mayendfileinput\endinput%
\else\global\let\beginned\relax\let\mayendfileinput\relax\fi
%
\mayendfileinput    % End or not end = file input, as set above.
%
% Add user commands here below:

\documentclass[leqno]{article}

\usepackage{color}
\usepackage{hyperref}

% AMS Fonts Package
\usepackage{amssymb}
\usepackage{amscal}    % Use AMS = calligraphic instead of TeX.

% AMS LaTeX Package
\usepackage{amsmath}
\usepackage{amscd}

\usepackage{rsfs}   % Use RSFS to define = \mathscr

\usepackage{abergmath}

%\input hyphenations    % Hyphenation = file
%\input definitions     % = Definitions file

\begin{document}
% EOF begin.tex
---------------------------------------------------------------<= /FONT>
% File end.tex:
\ifx\rebeginned\relax\message{file: Not yet.}%
\let\rebeginned\undefined\let\mayendfileinput\endinput%
\else\message{file: = Now.}\let\mayendfileinput\relax\fi
%
\mayendfileinput    % End or not end = file input, as set above.
%
% Add user commands here below:

\end{document}
%\end

% EOF end.tex
---------------------------------------------------------------<= /FONT>

If one use the stuff above, then if say main.tex = contains
  \input chapter1
  \input chapter2
  ...
and all files, main.tex, chapter1, ..., contain = the
  \input begin
  ... % text
  \input end
pair, then the user defined commands of this pair = will only be read once,
so it becomes possible to compile each chapter1.tex, = ... individually.
However, LaTeX will be confused when later compiling = main.tex because of
multiply defined labels (but only on the level of = warnings, I think).

The idea would be to somehow integrate such a system = into LaTeX, so that it
works correctly with respect to labels, perhaps with = a \begin{...} ...
\end{...} pair replacing the \input being ... \input = end stuff.

  Hans Aberg

------_=_NextPart_001_01C13140.3E8A3F00--