"etex.src"
"etex.src"
, is in principle
merely a wrapper for "plain.tex"
, providing modified definitions
for some Plain TeX commands (at present, just
one: \tracingall
) and adding new commands
(\eTeX
, \loggingall
, \tracingnone
,
\newmark
, \load
, \addlanguage
and
\uselanguage
in the first release). In so doing, we have taken
the opportunity to (a) provide intrinsic support for multiple-language
typesetting (by deferring the processing of patterns and exceptions until a
rudimentary language-handling environment has been defined), and
(b) provide a simple but effective module-handling system, to allow e-TeX
ancilliary source files to be structured as libraries rather than as flat
linear text files. As these extensions are not currently documented elsewhere,
a brief explanation of their syntax and semantics is provided here.
\tracingall
\tracingassigns
,
\tracinggroups
, \tracingifs
and \tracingscantokens
; the numeric value assigned
to the TeX primitive \tracingcommands
is increased
as e-TeX will report additional detail in these circumstances.
\eTeX
etexdefs.lib
in due course.
\loggingall
\tracingall
\tracingonline = 0
.
\tracingnone
\tracing...
primitives following use of
\tracingall
or \loggingall
.
\newmark
\marks
rather than the single
\mark
of TeX, an allocator mechanism is required; we
believe that \marks
are closer to
\box
es than to (say) \count
s or
\dimen
s and so have provided an analogous allocation
mechanism, in that \newmark
 <control
sequence or active character
> assigns a numeric
value to the parameter rather than making it a synonym for an
actual \mark
; this numeric value can then be used to access
individual \marks
, \topmarks
,
\splitbotmarks
, etc., as in
\newmarks \rectomarks . . . \marks \rectomarks {This may form part of the recto running head} . . . \leftline {\topmarks \rectomarks}It should be noted that as
\marks 0
is synonymous with
\mark
, \newmarks
will never allocate that
particular value.
\load
\input
ting a complete file or for \read
ing a
file line-by-line, it makes no provision for any intermediate level of
file access. In e-TeX, we provide facilities for
\input
ting one or more named modules from a
suitably structured library file. The syntax used is:
\load <module>[, <module>...] from <file>whilst the library file itself should be structured as:
%! e-TeXlib Vx.y \module {<name>} . . . \endmodule \module {<name>} . . . \endmodule etc.The DSC-style header is required, and the actual values in
Vx.y
must correspond to the current version/revision
of e-TeX; for the first production release, the header must therefore
be:
%! e-TeXlib V1.1If a library file is changed during the lifetime of the system, it is recommended (but not required) that this amendment be recorded in a cycle number appended to the header; a cycle number is of the form
;
digit[s],
and thus a valid header for the first release of e-TeX might be
any of:
%! e-TeXlib V1.1 %! e-TeXlib V1.1;1 %! e-TeXlib V1.1;247etc. The necessity for a perfect match between the library header and the current version/revision of e-TeX may be relaxed in a future release if it transpires that no changes in the structure of user libraries are required for compatibility with future versions of e-TeX.
\language
and
\setlanguage
primitives with the advent of TeX 3.0, no
change was made to the Plain TeX source code to really exploit these
features with the single exception of the \newlanguage
command. In "etex.src
", we defer the loading of
patterns and hyphenation exceptions until a
rudimentary language handling environment has been defined. We now
assume that the user (or rather the format-creator) will create a file
called "language.def
" in which he or she will list the
various languages to be supported by the format. Each entry apart from
the last in "language.def
" is of the form:
\addlanguage {<language>} {<patterns file>} {<exceptions file>} {<left hyphen min>} {<right hyphen min>} %%% shewn wrapped for clarityThe first line should normally be:
\addlanguage {USenglish}{hyphen.tex}{}{3}{2}whilst the last might be
\uselanguage {USenglish}if the normal defaults of TeX are to obtain, or
\uselanguage
with some other language if it is more
appropriate. In the absence of a suitable language.def
file, the default fallback mode (USenglish, with the canonical patterns,
exceptions and left- and right-hyphen minima for TeX) will be used.
Within the user document, \uselanguage {<some
language>}
should be used to switch languages, which
will have the effect of loading appropriate patterns, exceptions, and
left- and right hyphen minima. To allow the use of more powerful
language-handling environments (e.g. Babel),
the \uselanguage
command finishes by testing whether the
putative control sequence \uselanguage@hook
is defined; if
it is, then it is expanded, passing as parameter the name of the
language to be used. It should be noted that \uselanguage
is automatically invoked during the expansion of
\addlanguage
prior to the reading of patterns;
a further hook, \addlanguage@hook
, is invoked in an
identical manner after the reading of patterns and exceptions
so as to allow (for example) category-codes to be changed for the
duration of the pattern- and exception-loading régime. This code is
still classed as experimental, and if it transpires that a superior
mechanism would improve the interface to
Babel
or LaTeX, it may be
enhanced in the future.
The e-TeX format source "etex.src" is a product of the NTS group.