Undo XeTeX char classes when patching an older kernel
[latex2e.git] / trunk / doc / modguide.tex
blob147fec787815a7e736fd2d4a8c8e8f15416ef919
1 % \iffalse meta-comment
3 % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
4 % The LaTeX3 Project and any individual authors listed elsewhere
5 % in this file.
6 %
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
9 %
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
22 % information.
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
28 % \fi
29 % Filename: modguide.tex
31 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
33 \documentclass{ltxguide}[1995/11/28]
35 \newcommand{\reasonsection}[1]{\subsubsection*{\it #1}}
37 \newcommand{\nstex}{\textsf{NS-TeX}}
39 \setcounter{secnumdepth}{-1}
41 \title{Modifying \LaTeX}
43 \author{\copyright~Copyright 1995, \LaTeX3 Project Team.\\
44 All rights reserved.}
46 \date{12 December 1995}
48 \begin{document}
50 \maketitle
52 \tableofcontents
54 \begin{abstract}
55 This document was produced in response to suggestions that the
56 modification and distribution conditions for the files constituting
57 the New Standard \LaTeX{} system should be similar to those implied
58 by Version~2 of the \textsc{GNU} General Public Licence, as
59 published by the Free Software Foundation.
60 \end{abstract}
62 \section{Introduction}
63 \label{sec:intro}
65 This article describes the principles underlying our policy on
66 distribution and modification of the files comprising the \LaTeX{}
67 system. It has been produced as a result of detailed discussions of
68 the issues involved in the support and maintenance of a widely
69 distributed document processing system used by diverse people for many
70 applications. These discussions have involved users, maintainers of
71 installations that support \LaTeX{} and various types of organisations
72 that distribute it. The discussions are continuing and we hope that
73 the ideas in this article will make a useful contribution to the
74 debate.
76 Our aim is that \LaTeX{} should be a system which can be trusted by
77 users of all types to fulfill their needs. Such a system must be
78 stable and well-maintained. This implies that it must be reasonably
79 easy to maintain (otherwise it will simply not get maintained at
80 all). So here is a summary of our basic philosophy:
81 \begin{quote}
82 We believe that the freedom to rely on a widely-used standard for
83 document interchange and formatting is as important as the freedom to
84 experiment with the contents of files.
86 We are therefore adopting a policy similar to that which Donald
87 Knuth applies to modifications of the underlying \TeX{} system: that
88 certain files, together with their names, are part of the system and
89 therefore the contents of these files should not be changed unless
90 the following conditions are met:
91 \begin{itemize}
92 \item they are clearly marked as being no longer part of the
93 standard system;
94 \item the name of the file is changed.
95 \end{itemize}
96 \end{quote}
99 \section{The system}
100 \label{sec:sys}
102 In developing this philosophy, and the consequent limitations on how
103 modifications of the system should be carried out, we were heavily
104 influenced by the following facts concerning the current widespread
105 and wide-ranging uses of the \LaTeX{} system.
106 \begin{enumerate}
107 \item \LaTeX{} is not just a document processing system;
108 it also defines a language for document exchange.
110 \item The standard document class files, and some other files, also
111 define a particular formatting of a document.
113 \item The packages that we maintain define a particular document
114 interface and, in some cases, particular formatting of parts of a
115 document.
117 \item The interfaces between different parts of the \LaTeX{} system
118 are very complex and it is therefore very difficult to check that a
119 change to one file does not affect the functionality of both that
120 file and also other parts of the system not obviously connected to
121 the file that has been changed.
122 \end{enumerate}
124 This leads us to the general principle that:
125 \begin{quote}
126 with certain special exceptions, if you change the contents of a
127 file then the changed version should have a different file name.
128 \end{quote}
130 We certainly do not wish to prevent people from experimenting with the
131 code in different ways and adapting it to their purposes. However, we
132 are concerned that any distribution of modifications to the code
133 should be very clearly identified as not being a part of the standard
134 distribution. The exact wording and form of the distribution
135 conditions is thus something that is flexible, but only within the
136 constraint of keeping \LaTeX{} as a standardised, reliable product for
137 the purposes described above: the exchange and formatting of
138 documents.
141 \section{Some examples}
142 \label{sec:expl}
144 Here we elaborate the arguments that have led us to the above
145 conclusion.
148 \reasonsection{Separate development considered harmful!}
149 \label{sec:ja}
151 In many fields, the use of \LaTeX{} as a language for communication
152 is just as important as its capacity for fine typesetting; this is a
153 very important consideration for a large population of authors,
154 journal editors, archivists, etc.
156 Related to this issue of portability is the fact that the file names
157 are part of the end-user syntax.
159 As a real example, the \LaTeX{} `tools' collection contains the
160 package `array.sty'. A new user-level feature was added to this file
161 at the end of 1994 and a document using this feature can contain the
162 line:
163 \begin{verbatim}
164 \usepackage{array}[1994/10/16]
165 \end{verbatim}
167 By supplying the optional argument, the document author is indicating
168 that a version of the file \texttt{array.sty} dated no earlier than
169 that date is required to run this document without error.
171 This feature would be totally worthless if we were to allow an
172 alternative version of the array package to be distributed under the
173 same name since it would mean that there would be in circulation files
174 of a later date, but without the new feature. If the document
175 were processed using this `alternative array' then it would certainly
176 produce `undefined command' errors and would probably not be
177 processable at all.
180 \reasonsection{What's in a file-name?}
181 \label{sec:jb}
183 In a pure markup language, such as SGML, it is reasonably clear that
184 control over the final presentation lies with the receiver of a
185 document and not with the author.
187 However, the way that \LaTeX{} is often used in practice means that
188 most people (at least when using the standard classes and packages)
189 expect the formatting to be preserved when they send the document to
190 another site.
192 For example, suppose, as is still the most common use of \LaTeX{} in
193 publishing, you produce a document for `camera-ready-copy' using the
194 class `article' and that you carefully tune the formatting by, for
195 example, adding some explicit line breaks etc, to ensure that it fits
196 the 8 page limit set by the editor a journal or proceedings.
198 It then gets sent to the editor or a referee who, without anyone
199 knowing, has a non-standard version of the class file `article' and so
200 it then runs to 9 pages. The consequence of this will, at the least,
201 be a lot of wasted time whilst everyone involved works out what has
202 gone wrong; it will probably also lead to everyone blaming each other
203 for something which was in fact caused by a misguided distribution
204 policy.
206 It should also be noted that, for most people, the version of the
207 class file `article' that gets used is decided by a site maintainer
208 or the compilers of a CD-ROM distribution. To most users,
209 the symbols \texttt{a\,r\,t\,i\,c\,l\,e} in:
210 \begin{verbatim}
211 \documentclass{article}
212 \end{verbatim}
213 are just as much part of \LaTeX{}'s syntax as are the symbols
214 \texttt{1\,2\,p\,t} in:
215 \begin{verbatim}
216 \hspace{12pt}
217 \end{verbatim}
218 Thus they should both define a standard formatting rather than
219 sometimes producing 1 more page or a 5pt larger space.
221 Users rely on the fact that the command (or menu item) `LaTeX'
222 produces a completely standard \LaTeX, including the fact that
223 `article' is the `standard article'. They would not be at all happy
224 if the person who installed and maintains \LaTeX{} for them were
225 allowed to customise `article' every second day so as (in her or his
226 opinion) to improve the layout; or because another user wanted to write
227 a document in a different language or typeset one with different fonts.
229 \reasonsection{\TeX{} itself}
230 \label{sec:tex}
232 We have modelled our policies on those of the \TeX{} system since this
233 has for some time now been widely acknowledged as a very stable and
234 high quality typesetting system.
236 The distribution policy set up by Donald Knuth for \TeX{} has the
237 following features:
238 \begin{itemize}
239 \item There is a clearly specified method for changing parts of the
240 software by the use of `change files'.
241 \item Although arbitrary changes are allowed, the resulting program
242 can be called \TeX{} only if its functionality is precisely the same
243 as that of \TeX{} (i.e.~neither less nor more) in all important
244 areas.
245 \item There are many files in the system that cannot be changed at all
246 (without changing the name): examples are the file
247 \texttt{plain.tex} and the files associated with fonts, including
248 the Metafont source files.
249 \end{itemize}
252 \reasonsection{Maintaining complexity}
253 \label{sec:compl}
255 Our experience of maintaining \LaTeX{} has shown us just how complex
256 are the interactions between different parts of the system.
258 We have therefore, with lots of help from the bug reports you send in,
259 developed a large suite of test files which we run to check the
260 effects of every change we make. A non-negligible percentage of these
261 test runs give unexpected results and hence show up some unexpected
262 dependency in the system.
265 \section{Some assurances}
266 \label{sec:conc}
268 We are certainly not attempting to stop people reformatting \LaTeX{}
269 documents in any way they wish. There are many ways of customising
270 incoming documents to your personal style that do not involve changing
271 the contents of \LaTeX{}'s standard files; indeed, this freedom is one
272 of the system's many advantages.
273 The simplest way to achieve this is to replace
274 \begin{quote}
275 \verb|\documentclass{article}|\quad by\quad
276 \verb|\documentclass{myart}|
277 \end{quote}
279 Nor do we wish to discourage the production of new packages improving
280 on the functionality or implementation of those we distribute. All we
281 ask is that, in the best interests of all \LaTeX{} users, you give
282 your superbly improved class or package file some other name.
284 \section{Configuration possibilities}
285 \label{sec:conposs}
287 The standard \LaTeX{} system format can be configured in several ways
288 to suit the needs and resources of an installation. For example, the
289 loading of fonts and font tables can be customised to match the font
290 shapes, families and encodings normally used in text mode. Also, by
291 producing the appropriate font definition files, the font tables
292 themselves can be set up to take advantage of the available fonts and
293 sizes. The loading of hyphenation patterns can be adjusted to cover
294 the languages used; this has to be done as part of making the format
295 since this is the only stage at which patterns can be loaded.
297 A complete list of these configuration possibilities can be found in
298 the distributed guide \emph{Configuration options for} \LaTeXe{}
299 (\texttt{cfgguide.tex}). However, as it says there, the number of
300 configuration possibilities is strictly limited; we hope that having
301 read this far you will appreciate the reasons for this decision. One
302 consequence of this is that there is no provision for a general
303 purpose configuration file, or for adding extra code just before the
304 |\dump| of the format file.
306 This was a deliberate decision and we hope that everyone (yes, that
307 includes you!) will support its intent. Otherwise there will be a
308 rapid return to the very situation, of several incompatible versions
309 of \LaTeX~2.09, that originally prompted us to produce \LaTeXe{}: the
310 new, and \emph{only}, `Standard \LaTeX'. This will make \LaTeX{}
311 unmaintainable and, hence, unmaintained (by us, at least).
313 \begin{quote}
314 Therefore you should not misuse the configuration files or other
315 parts of the distribution to produce non-standard versions of
316 \LaTeX{}.
317 \end{quote}
319 Some of the allowed configurations can result in a system that can produce
320 documents that are no longer `formatting compatible'; for example, the
321 use of different default fonts will most likely produce different line
322 and page breaks. If you do produce a system that is configured in
323 such a way that it is not `formatting compatible' then you should
324 consider carefully the needs of users who need to create portable
325 documents. A good way to provide for their needs is to make
326 available, in addition, a standard form of \LaTeX{} without any
327 `formatting incompatible' customisations.
330 \section{Modification conditions}
331 \label{sec:modcon}
333 It is possible that you need to produce a document processing system
334 based on standard \LaTeX{} but with functionality that cannot be
335 implemented by using the approved configuration files and complying
336 with the restriction on the code that is allowed in them. In other
337 words, you may need a system which is sufficiently distinct from
338 Standard \LaTeX{} that it is not feasible to do this simply by using
339 the configuration options we provide or by producing new classes and
340 packages.
342 If you do produce such a system then, for the reasons described
343 above, you should ensure that your system is clearly distinguished
344 from Standard \LaTeX{} in every possible way, including the following.
347 \begin{enumerate}
348 \item
349 Give your system a distinguished name, such as \nstex, which clearly
350 distinguishes it from \LaTeX{}.
352 \item
353 Ensure that it contains no file with a name the same as that of
354 a file in the standard distribution but with different contents.
355 (If this is not possible then you must:
356 \begin{itemize}
357 \item
358 ensure that files from the non-\LaTeX{} system cannot be
359 accidentally accessed whilst using a standard \LaTeX{};
360 \item ensure that each file from the non-\LaTeX{} system clearly
361 identifies itself as a non-\LaTeX{} file on the terminal and in the
362 log file.)
363 \end{itemize}
365 \item
366 Ensure that the method used to run your system is clearly
367 \label{mcon:command}
368 distinct from that used to run Standard \LaTeX; e.g.~by using a
369 command name or menu entry that is clearly not \texttt{latex}
370 (or \texttt{LaTeX} etc).
372 \item
373 Ensure that, when a file is being processed by your system, the
374 use of non-standard \LaTeX{} is clearly proclaimed to the user by
375 whatever means is appropriate.
377 \item Ensure that what is written at the beginning of the log file
378 clearly shows that your system has been used, and that it is
379 not Standard \LaTeX{}.
380 See the file \texttt{cfgguide.tex} for how to achieve this.
382 \item
383 Clearly explain to users that bug reports concerning your
384 system should not be sent to the maintainers of Standard
385 \LaTeX{}.
386 \end{enumerate}
388 \subsection*{Note to system administrators}
390 If you install a non-standard (modified) version of \LaTeX{} on a
391 multi-user site then please, in addition, install Standard \LaTeX{}
392 and observe the conditions enumerated above, particularly
393 \ref{mcon:command}.
396 \section{What do you think?}
397 \label{sec:you}
399 We are interested in your views on the issues raised in this document.
400 The best way to let us know what you think, and to discuss your ideas
401 with others, is to join the \texttt{LaTeX-L} mailing list and send your
402 comments there.
403 To subscribe to this list, mail to:
404 \begin{verbatim}
405 listserv@urz.uni-heidelberg.de
406 \end{verbatim}
407 the following one line message:
408 \begin{verbatim}
409 subscribe LATEX-L <your-first-name> <your-second-name>
410 \end{verbatim}
412 \end{document}