Debian Codegraph @

texmf-dist/doc/etex/base/NTS-FAQ

raw
1 Date: Tue, 31 Jan 1995 21:15:16 +0100
2 Sender: NTS-L Distribution list <[email protected]>
3 From: "J%org Knappen, Mainz" <[email protected]>
4 Subject: Frequently asked questions of NTS-L, 5th edition
5 X-To: nts-l <[email protected]>
6 To: Multiple recipients of list NTS-L <[email protected]>
7
8 Frequently Asked Questions of NTS-L
9
10 Fifth edition
11 Date: 31-JAN-1995
12 Archive name: nts-l-faq
13 Currently maintained by: [email protected] (J%org Knappen)
14
15 Remark about the format:
16
17 This faq is divided into several sections and subsections. Each section
18 contains a subsection general with some ideas which have not yet been
19 discussed. I added a date to some subsections to allow you to retrieve
20 fuller discussions from the archives. The transactions of this group are
21 archived on
22
23 ftp.th-darmstadt.de [130.83.55.75] *)
24 directory pub/tex/documentation/nts-l
25
26 Each file in this directory is named yymm, where (guess :-) yy is the
27 year and mm is the month when the mail arrived. (I.e., all postings
28 of one month are bundled in one file.)
29 *) Avoid using the number above ... it is subject to changes.
30
31 Related stuff which is very worth reading you can find on the CTAN archives
32 under tex/info/tex-implementors. In addition, I recommend reading the list
33 of TeX bugs (tex-archive/systems/knuth/errata/tex82.bug).
34
35 -1. Contents
36
37 0. About NTS
38 1. Proposed features of a New Typesetting system
39 1.1. Improvement of Quality
40 1.2. Internationality
41 1.3. New Look and Feel
42 1.4. Changing the ligaturing algorithm
43 1.5. Writing more than one dvi-file
44 1.6. Anchors
45 1.7. dump/restore mechanism
46 2. Proposed additions to TeX (concrete new primitives)
47 2.1. \lastmark etc.
48 2.2. \system
49 2.3. \skylineskiplimit, \skylinehorizontallimit
50 2.4. \directioncode
51 2.5. \textcode
52 2.6. \afterfi
53 2.7. \interactionmode
54 2.8. \mathspacing
55 2.9. \inputescapechar
56 2.10. \middle
57 2.11. \outputunit
58 2.12. \protected
59 2.13. \scantokens
60 2.14. \deferred
61 2.15. \everyeof
62 2.16. \readline
63 2.17. \evaluate
64 2.18. \ifevaluate
65 2.19. \everyeof
66 2.20. \fancyprompt
67 3. Metaremarks
68 3.1. TeX is not perfect
69 3.2. In which language shall NTS be written
70 3.3. The TeX language
71 3.4. The TeX engine
72 3.5. Extensions and Enhancements
73 4. Deviations
74 4.1. Automated Kerning
75 4.2. About Lout
76 5. Proposed changes to METAFONT
77 5.1. Writing to auxiliary files
78 6. Proposed changes to the tfm file format
79 6.1. Vertical kerning
80 6.2. Cross-font ligatures
81 7. Proposed changes to the dvi file format
82 7.1. Horizontal and Vertical Mirroring
83 7.2. Rotation of a glphy by 180 degrees
84 8. Additions to the TeX kit
85 8.1. dvicopy
86 8.2. dv2dp and dp2dv
87 8.3. gftotxt
88 8.4. qdtexvpl
89 8.5. fontinst
90 8.6. afmtotfm
91 8.7. dvipaste
92 8.8. METAPOST
93 8.9. Tie
94 8.10. dvi2dvi
95 9. Existing extensions to TeX
96 9.1. TeX-XeT
97 9.2. TeX--XeT
98 9.3. MLTeX
99 9.4. SiSiSi
100 9.5. Japanese TeX
101
102 0. About NTS (Mar 93, see also Jul 92)
103
104 At DANTE '93, held at the Technical University Chemnitz last week, Joachim
105 Lammarsch, President of Dante, announced that the NTS project which had been
106 started under the aegis of DANTE, was to be re-formed under a new
107 co-ordinator, Philip Taylor. The old core group, announced at the previous
108 annual DANTE meeting, was to be dissolved, and a new core group established.
109 Membership of the new core group will not be restricted to DANTE members,
110 but will instead be offered to various well-known names (and some
111 lesser-known!) in the international TeX community.
112
113 see also:
114 F. Mittelbach: E-TeX Guidelines for future TeX, TUGboat v11n3 (1990)
115 P. Taylor: The future of TeX, EuroTeX'92 Prag (Proceedings); reprinted
116 in TUGboat v13n4, 433 (1992)
117
118 As of September 1994, there are two activities going on, the ETeX group
119 is working on a extension of TeX and is going to produce a first ETeX soon.
120 The NTS group takes the path to reimplement TeX in common LISP to get
121 a deeper understanding of how the modules of TeX are cooperating which
122 eachother.
123
124 Independently, the Omega project was launched to produce a typesetting system
125 which uses unicode as internal code and can handle arbitrarily encoded input
126 via filters.
127
128 The beforementioned projects were presented at the 1994 TUG meeting at Santa
129 Barbara and at the EuroTeX'94 conference at Gdansk. For more information,
130 consult the respective proceedings. For the Omega project exists a mailing
131 list, [email protected]. To subscribe, send an e-mail to [email protected].
132
133 Omega is now announced to be presented at March 16, 1995 at CERN (Geneva).
134
135 1. Proposed features of a New Typesetting system
136
137 1.1. Improvement of Quality
138
139 1.1.0 General:
140 Optimised page breaking, avoiding ``rivers'', letterspacing (see also 4.1),
141 Hyphenation (Haupt- und Nebentrennstellen), grid typesetting
142
143 1.1.1 Skyline approach to line breaking (Mar 93)
144
145 You can break paragraphs as usual with the current model, where all
146 lines are simple rectangular boxes. If there's no necessity to insert
147 \lineskip, then you don't have to look at the skyline. Only if two
148 lines are too near (e.g. distance<\lineskiplimit), you have to look
149 into the two rectangular boxes and to check if the boxes inside
150 overlap at one or more places.
151 For the worst case (i.e., you have to look at the skyline for all
152 pairs of lines) processing the skyline model consumes a lot of process
153 time, but this shouldn't hinder us to test this idea and look at the
154 results.
155
156 Btw, the skyline model seems to be easy to implement in the current
157 TeX, because we need only some changes when the finally broken lines
158 of the paragraph are put on the vertical list. There are more changes
159 needed in the code, if the line break should be changed for the cases
160 where it is possible to avoid an overlap with other break points, but
161 IMHO it's nonetheless a relatively small change.
162
163 Additionally you have to introduce some new parameters. I think of
164 something like:
165 \skylineskiplimit (b)
166 minimum vertical distance between two boxes
167 \skylinehorizontallimit (a)
168 minimum horizontal distance
169
170
171 line 1: ------------
172 % %
173 % % ----------
174 ------- <== (a) ==> % %
175 ~ % %
176 (b) % -------
177 v %
178 ----------------------
179 line 2:
180
181 and other parameters, but the necessary parameter set, realization,
182 etc. for "skylines" are subject of discussion.
183
184
185 1.2. Internationality
186
187 1.2.0 General:
188 Typesetting in arbitrary directions, unicode support (16bits), ISO10646
189 support (32bits), ligatures pointing to other fonts, vertical kerning,
190 better accent handling (\topaccent and \botaccent)
191
192 Remark: UTF-8 (UNICODE) can be handled with `TeX classic', LaTeX2e
193 support is provided by the CJK package written by Werner Lemberg.
194
195 1.2.1 Supporting TeX--XeT primitives for right to left typesetting
196 TeX--XeT is an existing extension to TeX supporting right-to-left
197 typesetting an producing a usual dvi-file. TeX--XeT is written by
198 P. Breitenlohner and freely available. It is different from TeX-XeT
199 (one hyphen only). Allthough TeX will be frozen at version $\pi$,
200 this is not true for TeX--XeT. (see also 9.2)
201
202 1.3. New Look and Feel
203
204 1.3.0 General
205 Windows support, wysiwyg-like features
206
207 1.3.1 Interaction with the operating system and other programmes
208 see 2.2. \system
209
210 1.4. Changing the ligaturing algorithm
211 Replace the (IMHO over-)optimized ligature builder/kerning routines in
212 TeX by routines which separate between the building of ligatures and
213 the insertion of kerns between the characters/ligatures.
214
215 This can be realized in a simple way by using two passes: in the
216 first pass the ligatures are built and in the second pass the
217 resulting ligatures and remaining single characters are used to
218 determine the necessary kerns.
219
220 To ensure compatibility between e-TeX and TeX, it will be possible to
221 switch between the new and the current behaviour.
222
223 Additionally a flag in the TFM file of each font can be used to
224 specify which behaviour is to be used for the font. This ensures that
225 "old" fonts with some tricky ligature/kerning programs depending on
226 the old behaviour can still be used with e-TeX. (I don't know if this
227 font dependent switching is really necessary. Comments, please!!)
228
229 Example:
230
231 A font contains the following ligatures and kerns:
232
233 o " => ligature (o") (= \"{o})
234 V o => kern(-smallkern)
235 V lig(o") => nothing
236
237 Input: V o "
238 Output of current TeX: V kern(-smallkern) ligature(o")
239 Output with change: V ligature(o")
240
241 Status:
242
243 Bernd Raichle has written a simple, but running reimplementation of TeX's
244 ligature/kerning routine (in CommonLisp), which still waits to be
245 rewritten as a TeX.web change file.
246 The ligature builder/kerning routine is realized in one pass; kerns
247 are introduced in a delayed manner, i.e., after we are sure that
248 there's no possibility for a ligature.
249 Additionally there's a switch between the current TeX and the new
250 behaviour. (The TRIP test fails with the new behaviour.)
251
252 PS: IMHO the ligature/kerning routines should be further changed to
253 remove the `shelf{}ful' anomaly (see TeXbook, exercise 5.1), i.e.,
254 reinserting ligatures when words are hyphenated.
255 The change should allow ligatures for inputs like `f{}f' or
256 `f\relax f', which will simplify the macros in `german.sty',
257 Babel and changed macros for \", \', ... which are used to select
258 characters from DC fonts or other fonts with national characters.
259
260 1.5. Writing more than one dvi-file (Nov 94)
261 I want to have TeX ready in the memory and avoid loading it anew and anew
262 for each run again which costs lots of startup time, if you have to load
263 every file via NFSS.
264 The idea I am toying with is to have something like
265 \level
266 which clones the current state of TeX and allows to start a new dvi-file.
267 Then you do anything you want (start even another \level) and at last you say
268 \exit
269 which performes like \end, except that it restores exactly the state before
270 the last cloning.
271 To communicate some information to the waiting lion, there may be one
272 exeption. You say
273 \exit{some_integer_number}
274 and this number can be read by using
275 \exitstatus.
276 Applications are many. If you have a format which usually requires several
277 runs, you can do all the runs within one job, and automatically decide,
278 whether a further run is necessary. Of course, you should device your format
279 to have a counter maxruns to avoid endless looping...
280
281 1.6. Anchors (Nov 94)
282 Proposed by Jiri, an ``anchor point'' would be in some senses
283 be analogous to a mark, but rather than recording textual information it
284 would instead record the co-ordinates of itself, relative to the reference
285 point of the smallest surrounding box. Additional new primitives would
286 be required to return the co-ordinates of a specified anchor point.
287
288 1.7. dump/restore mechanism
289 I'd suggest something much simpler, but also more general: Include \dump in
290 all versions of TeX. The initex/virtex distinction is simply not worth the
291 bother of retaining any more - the memory differences are trivial in modern
292 terms. \dump should ideally also be extended to allow dumping from inside of
293 a group.
294 Once you do this, it becomes possible to write programs to analyze format
295 files. Since the analysis programs would not be part of TeX proper, they can
296 be as elaborate as anyone might want to make them. Sorting would be no
297 problem, for example.
298 None of this would cost anything in TeX itself, and except for the ability
299 to \dump inside a group, if added, would not even have an effect on whether
300 the resulting E-TeX is properly "TeX", since it would be invisible to any
301 possible trip test.
302
303 2. Proposed additions to TeX (concrete new primitives)
304
305 2.0. General (Jun 92, Jul 92, Aug 93, Nov 94)
306 A rather long list of proposed primitives (more or less worked out) was
307 posted by Karl Berry on 10-Jun-1992. It contains suggestions like:
308 \elseif (selfexplaining), \format{foo} (allow the author to select a format),
309 \host{name} \host{os} \host{type} \getenv to extract host information
310 \TeXversion, \usertime, \everyeof, and others.
311
312 It is currently not possible to get some information about the current
313 mode of TeX and make conditionals dependent on it and/or restore it after
314 some action (see 2.7. \interactionmode). More of this kind are a
315 conditional or primitive to signal, when TeX is in "expand only" mode
316 (\edef, \mark, \write, ...), when TeX is scanning numbers (here I'm
317 thinking---and hating---german.sty's active doublequote, which can also
318 be used as a marker for hexadecimal numbers), when TeX is peeking for
319 some special tokens (first column in an \halign), etc...
320
321 A list of new primitives, enhancements and extensions has been prepared
322 on the NTS meeting at Lindau in October 1994. It was posted to this list in
323 November 1994 and provoked plenty of discussions and additional suggestions.
324 Under the discussed primitves were \bind, \contents<box#>, \futuredef,
325 \ifdefined, \ifcsname ... \endcsname, \unless, \OSname, \defaultextension.
326
327 2.1. \lastmark etc. (Jun 92, Jul 92)
328 Currently you cannot remove a \write or \mark or
329 \insert or rule from any list at all. If we allow them to removed, how
330 will the commands appear to the user? If we have \lastmark like
331 \lastbox, then perhaps we need a mark data type so that we can say something
332 like \setmark0=\lastmark. It will probably be difficult
333 in the case of \insert's to think of a good command syntax.
334
335 Perhaps \lastpenalty, \lastkern, \lastskip should
336 remove the penalty, kern, skip, ... so that they are consistent with
337 \lastbox. Then \unpenalty, \unkern, and \unskip would be unnecessary.
338 (Of course most macro packages would probably want to reimplement them,
339 as macros: \def\unpenalty{\count@\lastpenalty},
340 \def\unkern{\dimen@\lastkern}, \def\unskip{\skip@\lastskip}.)
341
342 2.2. \system (Mar 93)
343
344 2.2.0 General
345 Oops, this got rather longish, but this topic has caused plenty of traffic.
346 I decided to quote directly the positions of both sides. The subpoints are
347 1. Pro 2. Contra 3. Syntax
348
349 2.2.1 Pro
350 First comes the proposal as formulated by Phil Taylor:
351
352 There has been much discussion on how a \system primitive might interact
353 with different operating systems, each with different functionality and a
354 different syntax. My idea was to extend the concept of a `TeX
355 implementation', which at the moment implies the creation and application
356 of a change-file to the master TeX source, to include an implementation-
357 specific macro library. Thus each implementor, as well as creating and
358 applying a change file, would also be responsible for mapping a well-defined
359 set of macros, through the \system primitive, to the syntax and
360 functionality of the operating system for which he or she has assumed
361 responsibility. To cite a specific example:
362
363 Assume that in e-Lib (a hypothetical macro library to accompany e-TeX),
364 a macro \sys$delete_file {<parameters>} is partially defined; then each
365 implementor would be responsible for mapping \sys$delete_file {<parameters}>
366 to his or her own implementation of \system. e-Lib would define the effect
367 and the result(s), \system would provide the interface, and the implementor
368 would be responsible for providing the mapping.
369
370 The question has been asked: ``Why via \system and macros? Why not via
371 explicit primitives to carry out the various functions that are envisaged?''
372
373 To which I would suggest that the answer is ``Because `the various functions
374 which are envisaged' is both enormous (requiring many new primitives), and
375 yet not large enough (because no matter what functionality we posit, someone
376 will come up with an idea that has not been considered).'' By implementing
377 just one \system primitive, and an extensible e-Lib macro library, one can
378 create a robust and well-tested e-TeX whilst allowing new system interactions
379 to be added at the simplest points: through the implementation-independent
380 and implementation-specific components of e-Lib.
381
382 2.2.2 Contra
383 And here's from the ``Minority Report'' (Tim Murphy and J"org Knappen)
384
385 May I recall the immortal words of Ken Thompson,
386 "A program should do one thing, and do it well." (TM)
387
388 I don't like the hackers to decide, making eTeX yet another programme from
389 which I can send e-mail and read news :-) Maybe people will tell me eTeX is
390 a fine operating system, but TeX version $\pi$ is the better typesetter :-)
391
392 But there is another side of \system, I want to call it the monstrosity
393 side. Many people are thinking now, that TeX is a monster and difficult to
394 tame. \system will add to this monstrosity. It will create a new paradise
395 for hackers creating system hacks. And it will make people turn away from
396 eTeX and use other products, even if they are far less secure. (JK)
397
398 2.2.3 Syntax
399 If a \system command is required, should it not have a similar syntax
400 and semantics to the a similar TeX command. I can't think of anything
401 else in TeX (prepares to be shown wrong) that expands in the mouth and
402 has side-effects. Should it not be like \read, \write etc. that is it
403 generates a whatsit that is obeyed at shipout, unless preceded by an
404 \immediate, in which case it is done immediately by the stomach.
405 There seem to be two obvious syntaxes, one like \write:
406 \system{foo} or \immediate\system{foo}
407 and one like \read:
408 \system{foo} to \baz or \immediate\system{foo} to \baz
409 The latter one would produce the exit code into \baz. Should this be
410 done with catcode 12 characters, or should it be done like \read, with
411 the current catcodes?
412
413 2.3. \skylineskiplimit, \skylinehorizontallimit
414 see section 1.1.1
415
416 2.4. \directioncode (May 1993)
417 A \directioncode (with syntax analogous to \uccode, \lccode, sfcode) to be
418 assigned to each input character. The basic ones are
419 0 -- transparent (space, full stop...)
420 1 -- left-to-right (latin letters, digits...)
421 2 -- right-to-left (hebrew letters, arab letters...),
422 a truly international NTS will also have codes for vertical typesetting
423 and some special cases.
424
425 The question is how to use this idea consistently. One could extend the
426 notion of TeX's modes. Horizontal mode is in fact left-to-right mode, a
427 right-to-left mode is missing. To be complete, this mode will be equipped
428 with boxen and all the stuff TeX's left-to-right (aka horizontal) mode has.
429
430 At the beginning of a paragraph NTS decides which mode to choose by the
431 \directioncode of the first input character. Sometimes the first character
432 will have the wrong code, in this case the insertion of an explicit
433 control sequence (like \lrbox{}) is necessary. If a character with another
434 directioncode occurs, NTS starts a \rlbox and finishes it as soon as a
435 character with the original \directioncode appears or at the end of the
436 paragraph.
437
438 For the building of right-to-left tables a \rlalign is needed.
439
440 2.5. \textcode (Sep 93, Nov 93)
441 Some of the character coding discussions in the Technical Working
442 Group on Multiple Language Coordination and some experiences I've made
443 with `german.sty' (specially the problems with an active doublequote
444 and hex integer constants!) lead to this _incomplete_ proposal/idea
445 for the following addition:
446 Introduce something like
447 \textcode (and \textchar & \textchardef)
448 which are the text (hmode) equivalent of TeX's \mathcode (and
449 \mathchar/\mathchardef) primitives.
450
451 With an equivalent and appropriate implemented \textcode primitive
452 (with the choice to define a character as "pseudo-active"), it would
453 be possible to
454 * relate characters to different fonts
455 (using a generalized `fam' of \mathcode)
456
457 * suppress expansion of active characters (it will only be
458 expanded, if it is read to form the hlist)
459 (using an equivalent \mathcode="8000 value)
460 [This point allows the use of e.g. a pseudo-active "
461 which expands to non-expandable tokens and it removes
462 the special construct \relax\ifmmode... for active
463 characters, too.]
464
465 2.6. \afterfi (August 1993)
466 In the answer to an exercise of the ``Around the Bend'' series, Michael Downes
467 realised the non-existence of an \afterfi primitive (Note: He did not
468 demand it nor really miss it). Perhaps an \afterfi can
469 simplify some obscure mouth-only macros with nested conditionals???
470 \afterfi should be expandable, because \if...\fi is expandable.
471
472 2.7. \interactionmode (Nov 93, was: \currentinteractionmode)
473 Add a new count register \interactionmode, which reflects the user
474 interaction level with the following values:
475 <= 0 batch_mode
476 = 1 nonstop_mode
477 = 2 scroll_mode
478 >= 3 error_stop_mode
479
480 The commands \batchmode...\errorstopmode, the "options" 'Q', 'R', 'S'
481 in the interactive error routine and all other TeX internal
482 interaction level changes (e.g. after an interruption) access this new
483 register. The level changes in the interactive error routine and the
484 old commands should always work, even if the symbol \interactionmode is
485 redefined (this means that the user can redefine \interactionmode, but the
486 commands \batchmode...\errorstopmode still work).
487
488 Examples:
489
490 \ifnum\interactionmode<1 \AskUser \else \UseDefault \fi
491
492 {\interactionmode=0 % switch to \batchmode
493 \global\font\test=xyz10 % try to load font
494 }% % restore former interaction level
495 % ... now test if font has been loaded
496 % without error (i.e. != nullfont)
497
498 2.8. \mathspacing (Nov 93)
499 Add a new count register array \mathspacing with 64 entries (we really
500 need only 64-8=56 entries, because some of them are never used, but to
501 simplify things 64 are used) with the following syntax:
502
503 \mathspacing <num1>=<num2> % 0 <= <num1> <= 63
504
505 The spacing specified in number <num2> is inserted between the two
506 math atom types specified in number <num1>. The two numbers are coded
507 as
508
509 <num1> = <left_atom_type> * 8 + <right_atom_type>
510 <num2> = ( (<display_spacing> * 256 + <text_spacing>) * 256
511 + <script_spacing> ) * 256 + <scriptscript_spacing>
512
513 This means that <num1> is easily expressed in octal and <num2> in
514 hexadecimal notation.
515
516 <..._atom_type> is one of the following seven types:
517
518 0 ordinary 1 large operator
519 2 binary operation 3 relation
520 4 opening 5 closing
521 6 punctuation 7 delimited subformula
522
523 <..._spacing> can be specified separately for each of the four math
524 styles (display, text, script and scriptscript) with the following
525 values:
526
527 0 no space
528 1 thin space (specified by \thinmuskip)
529 2 medium space ( -- " -- \medmuskip)
530 3 thick space ( -- " -- \thickmuskip)
531
532 4-255 reserved for other things
533 (e.g. other spacings and/or additional penalties,
534 like \relpenalty, \binoppenalty, ...)
535
536 For more information see TeXbook, pp. 170f & Appendix G and TeX--The
537 Program, \S 764ff.
538
539 Examples: (using TeX's standard spacing)
540
541 Between an `ordinary' (= 0) and a `relation' (= 3) atom a thick
542 space (= 3) is inserted, but not in script or scriptscript style.
543
544 \mathspacing '03 = "0033
545
546 Between a large operator (= 1) and an ordinary (= 0) atom a thin
547 space (= 1) is inserted:
548
549 \mathspacing '10 = "1111
550
551 Necessary changes for the sketched proposal are very simple to
552 implement.
553 The syntax of \mathspacing is awful, but this is true for \mathcode,
554 \delimitercode, etc.etc., too.
555
556 2.9. \inputescapechar (Nov 93, alternative names were proposed during
557 discussion)
558 Use two new internal count registers \inputescapechar and
559 \outputescapechar to specify the "escape" character to be used for
560 unprintable characters.
561 If \inputescapechar is not in [0..255], TeX's behaviour is used,
562 i.e., two equal characters with category 7 are used as a prefix for a
563 ~~x notated character, otherwise two characters with code
564 \inputescapechar are used for this prefix.
565 If \outputescapechar is not in [0..255], the character `~' is used
566 when an unprintable character has to be written.
567
568 The default values of these two registers are
569 \inputescapechar = -1
570 \outputescapechar = `~
571 to be compatible with TeX's standard behaviour.
572
573 2.10. \middle (Jan 94)
574 Generalize the syntax of \left<delimiter> <formula> \right<delimiter>
575 to allow one or more optional \middle delimiters,
576 \left<delimiter> <formula> \middle<delimiter> <formula> \right<delimiter>.
577
578 The middle delimiter grows to the same height as the left and right ones.
579 Constructions of this kind are used throughout quantum mechanics (Dirac
580 notation), e.g.
581 $$
582 \left\langle A \middle% \hat{O} \middle% B \right\rangle
583 $$
584 By default, the \middle element is \mathrel, you can make it
585 \mathord by embracing it {\middle %}.
586
587
588 2.11. \outputunit (Dec 93)
589 \outputunit unit to be used when e-TeX shows some dimen or glue
590 value
591 Usage: \outputunit=<unit of measure> (s. TeXbook p. 270)
592 Rationale:
593
594 Currently TeX forces the user to think in points when it outputs any
595 dimen or glue value (e.g. when issueing an overfull hbox warning).
596 But a program should adapt to the conventions of the user instead the
597 other way round. The addition of \outputunit whould make TeX much
598 more user-friendly, since only a few people are thinking in points.
599
600 2.12. \protected (new prefix for macro definitions) (Nov 94)
601 Analogous to \long, \outer, etc., causes the associated macro to be
602 non-expanding in contexts where such behaviour is likely to be undesirable
603 (in particular in \writes and \edefs); an explicit \expandafter \empty
604 may be used to force expansion in these circumstances.
605
606 2.13. \scantokens (Nov 94)
607 Allows an existing token-list to be re-input under a different catcode regime
608 from that under which it was created; as it uses all of TeX's present \input
609 mechanism, even %%ff notation will be interpreted as if \input. Causes an
610 `empty filename' to be input, resulting in `( )' appearing in the log file
611 if \tracingscantokens (q.v.) is strictly greater than zero. If the token
612 list represents more than one line of input, and if an error occurs, then
613 \inputlinenumber will reflect the logical input line from the token list
614 rather than the current input line number from the current file.
615
616 2.14. \deferred (Nov 94)
617 At the moment, only \writes are deferred; there are cases when it would
618 be desirable for other things, too, to be expanded only during \shipout,
619 and \specials are one of these. (See also 2.2.3)
620
621 2.15. \everyeof {<balanced text>}
622 Provides a hook whereby the contents of a token list register may be
623 inserted into TeX's reading orifice when end-of-file is encountered
624 during file reading. Would not be invoked of the file indicated
625 logical e-o-f through the medium of \endinput. Proposed by Phil
626 to allow clean processing of file-handling code which requires
627 a (sequence of characters yielding) \else or fi to be found in a
628 file, where no such sequence can be guaranteed.
629
630 2.16. \readline <integer> to <cs> (Nov 94)
631 Allows a single line to be read from an input file as if each character
632 therein had catcode 12. Intended to be used for verbatim copying
633 operations, in conjunction with \scantokens, or to allow error-free parsing
634 of `foreign' (non-TeX) files.
635
636 2.17. \evaluate {<arithmetic expression>} (Nov 94)
637 Intended for use on the r-h-s of \count, \dimen and \skip assignments,
638 it would allow the use of infix arithmetic operators such as +, -, * and /;
639 the type of the result would, in general, be the type of the simplest operand
640 forming a part of the expression, and the normal semantics of TeX would allow
641 this to be further coerced where necessary. Parenthesised sub-expressions
642 would be allowed.
643
644 Additional operations were proposed: trigonometric functions, square
645 root, pythagorean addition (METAFONT's `++'), angle{<delta_x, delta_y>}.
646
647 2.18. \ifevaluate{<boolean expression>}....\else....\fi (Nov 94)
648 The boolean expression should allow for the usual operators like
649 .not., .and., .or., .xor., =, >, <, <=, etc., if feasable it should also
650 allow the evaluation of arithmetic expressions. Some functions are needed
651 to get information old TeX \if's know now, I propose the name
652 \query<whatever> to these functions.
653
654 At the moment I see need for the following \query<whatever> functions:
655 \queryeof returns `1' if eof, `0' else
656 \querymode returns `0' in the infamous `no mode' (do we need to
657 differentiate finer here?
658 `1' in vertical mode
659 `2' in restricted vertical mode
660 `3' in horizontal mode
661 `4' in restricted horizontal mode
662 `5' in math mode
663 `6' in restricted math mode
664 With \querymode \ifmmode, \ifhmode, \ifvmode, and \ifinner can be emulated.
665 \querydefined{\cs} `1' if defined, `0' else
666 \querycsname...\endcsname (ditto)
667
668 2.19. \everyeof {<balanced text>}
669 Provides a hook whereby the contents of a token list register may be
670 inserted into TeX's reading orifice when end-of-file is encountered
671 during file reading. Would not be invoked of the file indicated
672 logical e-o-f through the medium of \endinput. Proposed by Phil
673 to allow clean processing of file-handling code which requires
674 a (sequence of characters yielding) \else or fi to be found in a
675 file, where no such sequence can be guaranteed.
676
677 2.20. \fancyprompt
678 allow configuration of the TeX prompt (default `*'), e.g.
679 *\fancyprompt{eTeX>}
680 eTeX>
681
682 3. Metaremarks
683
684 3.0. General
685 Remarks about group efforts vs. one person creating software (Mar 93),
686 ALGOL 68 as a warning example
687
688 3.1. TeX is not perfect (Jun 92, Jul 92)
689 The discussion has taken place in June and July 1992. Several details were
690 worked out, where TeX could be improved. Another point of criticism was
691 the programming language of TeX in general, several participants prefer a
692 procedural language over a macro language.
693
694 3.2. In which language shall NTS be written (Mar 93)
695 In 1992, there was much discussion, in which language an NTS should be
696 implemented (candidates were LISP, C, and WEB). This has settled in March
697 1993 (to PASCAL-WEB), because of the acceptance of the
698 idea that rather than wait for an ``all-singing, all dancing'' NTS, the
699 group should develop, in a stepwise manner, small but significant
700 enhancements to TeX. This implies that the enhancements are implemented as
701 change files in WEB.
702
703 3.3. The TeX language (Oct/Nov 93)
704 The TeX language is a simple language in the sense, that it contains only
705 few concepts. It belongs to the Lisp family. In particular, it's a
706 list-based macro language with late binding. Actually, that's all one
707 needs to say to characterize it.
708 Its data constructs are simpler than in Common Lisp: `token list' is the
709 only first order type. Glue, boxes, numbers, etc., are engine
710 concepts; instances of them are described by token lists.
711 Its lexical analzsis is simpler than CL: One cannot program
712 it. One can only configure it.
713 Its control constructs are simpler than in CL: Only macros, no
714 functions. And the macros are only simple ones, one can't compute
715 in them.
716
717 3.4. The TeX engine (Oct/Nov 93)
718 The TeX engine lies below the TeX language. Glue, boxes, numbers, etc.
719 belong to the TeX engine. The registers of the engine can be changed
720 by TeX's primitives. However, the latter seem to be quite unregular and
721 baroque.
722
723 3.5. Extensions and Enhancements (Nov 94)
724 `Extensions' are basically new primitives which have no effect on the
725 semantics of existing TeX documents, except insofaras any document which
726 tests whether such a primitive is, in fact, undefined, will clearly obtain
727 opposite results under TeX and e-TeX; `enhancements' are more fundamental
728 changes to the TeX kernel which may affect the semantics of existing TeX
729 documents even if no new primitive is used or even tested. Such changes
730 may be, for example, differences in the construction of TeX's internal
731 lists, or perhaps different hyphenation or ligaturing behaviour.
732
733 4. Deviations
734
735 4.0. General
736 (empty)
737
738 4.1. Automated Kerning (Oct 92)
739 Kindersley's "optical kerning": for the purposes of
740 kerning, each character is replaced by a circle centred on the centre of
741 gravity of that character; the radius of the circle is determined by the
742 fourth moment of the character (that is, the fourth root of the sum over
743 all black pixels of the fourth power of their distance from the centre). On
744 the UKTUG trip to Kindersley's studio, I tried to extract the reason why
745 the fourth, as opposed to third or fifth or whatever, moment is used; the
746 reason is apparently that it "looks right".
747
748 We can construct elaborate schemes for kerning (Kindersley's fourth
749 moments, FontStudio's (convex?) envelopes, Calamus' eight widths, etc), but
750 the proof of the typographical pudding is in the eating of the resulting
751 words, so to speak.
752
753 4.2 About Lout (June 1993)
754 In June 1993, the new system Basser Lout caused several questions and
755 suggestions on this list. The following is taken from a short review
756 of Lout by Bernd Raichle:
757
758 `Lout' is a (yet another) document formatting system, released under
759 the terms of the GNU General Public License and available on some ftp
760 servers.
761
762 IMHO it's more like a `troff' (with a better input language and some
763 newer concepts) than a `TeX'.
764
765 A few citations from the documentation of lout:
766
767 Lout is a high-level language for document formatting, designed and
768 implemented by the author. The implementation, known as Basser
769 Lout, is a fully operational production version written in C for the
770 Unix operating system, which translates Lout source code into
771 PostScript, a device-independent graphics rendering language
772 accepted by many high-resolution output devices, including most
773 laser printers.
774 [...]
775 When expert users can implement such applications quickly,
776 non-experts benefit. Although Lout itself provides only a small
777 kernel of carefully chosen primitives,
778
779 Lout has 23 primitive operators... missing, for example, the simplest
780 arithmetical operators (there is only the operator "@Next" which
781 increases a number by one).
782
783 packages written in Lout and distributed with Basser Lout provide an
784 unprecedented array of advanced features in a form accessible to
785 non-expert users. The features include rotation and scaling, fonts,
786
787 These features are mostly based on the output language... Postscript
788 (if you are looking inside a Lout package, you find large portions of
789 embedded Postscript code).
790
791 paragraph and page breaking,
792
793 TeX does a better job for these two items, because Lout is missing
794 most of TeX's paragraph/page breaking parameters. (Note: Lout uses
795 TeX's hyphenation algorithm and the hyphenation patterns.)
796
797 displays and lists, floating figures and tables, footnotes, chapters
798 and sections (automatically numbered), running page headers and
799 footers, odd-even page layouts, automatically generated tables of
800 contents, sorted indexes and reference lists, bibliographic and
801 other databases (including databases of formats for printing
802 references), equations, tables, diagrams, formatting of Pascal
803 programs, and automatically maintained cross references.
804
805 TeX's math setting abilities are better. Lout uses a package named
806 `eq' derived from the `eqn' preprocessor used with `troff'. And there
807 are other packages named `tab' (for tabulars) and `fig' (drawing
808 figures).
809
810 [...]
811 Lout is organized around four key concepts -- objects, definitions,
812 galleys, and cross references -- [...]
813
814 The concept of `galleys' and the "expansion" of recursive defintions
815 are IMHO the only new concept in Lout:
816
817 `galleys' are a way to describe a page, dividing it in certain regions
818 which can be filled from different sources (e.g. a footnote galley is
819 filled with footnote text, etc.).
820
821 Recursive definitions are very simple, e.g.
822 def @Leaders { .. @Leaders }
823 defines the command (Lout calls it `object') to "expand" to a `..' and
824 if there is place for another "expansion" it is called again.
825
826 For example
827 \hbox to 4in{Chapter 7 \dotfill 53}
828 is in Lout
829 4i @Wide { Chapter 7 @Leaders 53 }
830
831 With this recursive definitions, a whole document is defined as a
832 @PageList consisting of a @Page and a @PageList with an incremented
833 @PageNum. A @Page is defined as a set of `galleys' (header, text
834 body, footnotes, footer), which are also defined as a list of
835 text/footnotes/... and so on.
836
837 Perhaps others can add more impressions, mine are based on the
838 documentation coming with the Lout package and some tests done in
839 1-2 hours.
840
841 5. Proposed changes to METAFONT
842
843 5.O. General
844 Most of the General points in the discussion of TeX also apply to METAFONT.
845
846 5.1. Writing to auxiliary files
847 METAFONT should be able to write to auxiliary files. Desparately needed
848 for packages which allow to draw figures in METAFONT and label them in TeX
849 (BoF session at EuroTeX '92, Prague).
850
851
852 6. Proposed changes to the tfm file format
853
854 6.1. Vertical kerning (Jun 92)
855 This may sound exotic to you, but the AFM format can do
856 it. And I desperately need it for non-Latin alphabets (everytime I need
857 a character in a ligature raised or lowered, I have to reserve a position
858 in the font for it).
859
860 6.2. Cross-font ligatures (Jun 92)
861 Ligatures pointing to other fonts!! Yes, imagine for example that your
862 256 chars are full, you could still access characters by ligatures...but
863 they have to be in the same font.
864
865 7. Proposed changes to the dvi file format
866
867 7.0. General
868 A longer discussion about colour inclusion into the dvi-file occured in
869 Oct/Nov 93. The outcome was, that high-quality colour handling is a difficult
870 and device dependent task, better left to the printer driver. Colour can be
871 handled by the \special command which is sent directly to the driver.
872
873 On comp.text.tex I saw a remark, that specials may occur on places in the
874 dvi-file, where TeX can't put them. Maybe eTeX should take care of this
875 point.
876
877 7.1. Horizontal and Vertical Mirroring (Nov 94)
878 Allow a glyph to be mirrored in a vertical axis, placed centrally;
879 mirrored in a horizontal axis, placed at half the x(?)-height.
880
881 It was noted, that the specification of the axes might cause problems.
882 It was also noted, that several drivers understand specials for the
883 requested action.
884
885 7.2. Rotation of a glphy by 180 degrees (Nov 94)
886 This would greatly increase the power of vpl files (e.g. define schwa by
887 rotating e), and I hope that it would be possible for drivers to implement.
888
889 It was noted, that this is fine, but rotation by 90 degrees cannot be
890 device independent, because there are printers with rectangular (non-square)
891 pixels.
892
893 8. Additions to the TeX kit
894
895 8.0. General
896 The TeX kit, meaning the bundle of programmes building up a complete TeX
897 installation, contains besides the major programmes TeX and METAFONT
898 additional programmes, traditionally divided into several groups:
899
900 a) TeXware: dvitype, tftopl, pltotf, pooltype, pktype, patgen, vftovp,
901 vptovf, (outdated: pxtopk, pktopx)
902 b) MFware: mft, gftodvi, gftopk, gftype, (outdated: gftopxl)
903 c) webware: weave, tangle
904
905 And, of course, drivers for the screens and printers.
906
907 Other utility programmes more loosely associated with TeX are indexers
908 (makeindex, idxtex, glotex, ...) and bibliography tools (bibtex,
909 bibclean, ...). Makeindex and Bibtex are standard tools, because they
910 are described in the LaTeX manuals.
911
912 Another group includes drawing programmes (TeXCAD, xfig, gnuplot, ...) to
913 create graphics to be imported to TeX documents and graphics converters
914 (ghostscript, xv, bmt2font, ...).
915
916 8.1. dvicopy
917 Written in WEB by Peter Breitenlohner
918 Available from CTAN
919 Resolves all references to virtual fonts in a dvi file. Can be used to
920 create a dvi file without virtual fonts (e.g. for drivers which cannot
921 handle vf's).
922
923 8.2. dv2dp and dp2dv
924 Written in C by Geoffrey Tobin
925 Available on request from the author
926 dv2dp makes a human readable file from a dvi file. The companion
927 programme dp2dv makes a dvi file frome a dvi property list file.
928 It allows you to change dvi files with a text editor.
929
930 8.3. gftotxt
931 Written in C by Yannis Haralambous
932 Available ?
933 Extracts a certain kind of specials from the gf file into a text file.
934 Workaround for the famous non-ability of METAFONT to write auxiliary
935 files.
936
937 8.4. qdtexvpl
938 Written by Eberhard Mattes
939 Available from the CTAN archives
940 Generates a virtual font from TeX macros. qd = quick and dirty.
941
942 8.5. fontinst
943 Written in TeX by Alan Jeffrey
944 Available form CTAN
945 Makes virtual fonts from afm files (PostScript fonts). Used by the LaTeX
946 team to create virtual fonts and fd files for LaTeX2e.
947
948 8.6. afmtotfm
949 Written in C by Thomas Rokicki
950 Available from CTAN (part of dvips distribution)
951 Makes tfm files from afm files.
952
953 8.7. dvipaste
954 Part of LAMSTeX (Michael Spivak)
955 Allows to paste a dvi-file into another one.
956
957 8.8. METAPOST
958 Written in Web by John Hobby
959 Now freely available from the CTAN
960 A tool to build graphics to be included in TeX documents, uses a METAFONT
961 style language.
962
963 8.9. Tie
964 Written by Klaus Gunthermann
965 Available from CTAN
966 Allows to process multiple change files to a given Web source. A tool
967 of this kind is needed to build any eTeX distribution, since one has
968 tex.web, etex.ch, tex.ch-system, and etex.ch-system files to deal with.
969
970 8.10. dvi2dvi
971 Available from CTAN
972 Postprocessor for dvi files, allowing e.g. 2-up or 4-up layout of full
973 pages.
974
975 9. Existing extensions to TeX
976
977 9.0 General
978 Here I include short description of existing extensions to TeX. This section
979 does not include commercial TeX implementations because of lack of solid
980 enough information on them. It also does not yet include ETeX, NTS, nor
981 Omega.
982
983 9.1. TeX-XeT (Don Knuth and Pierre MacKay)
984 CTAN: tex-archive/systems/knuth
985 Adds new primitives \beginR, \endR, \beginL, and \endL for right to left
986 typesetting. Despite their names, the new primitives are insensitive to
987 TeX's grouping mechanism. Outputs a special file in dvi-ivd format, which
988 need be resolved by another programme or requires special drivers.
989
990 9.2. TeX--XeT (Peter Breitenlohner)
991 Available from CTAN tex-archive/systems/knuth/tex--xet
992 Implements the same primitives as TeX-XeT, but outputs a normal dvi file.
993 Passes the trip test (as far as I know).
994
995 9.3. MLTeX (Michael Ferguson)
996 Available from aldebaran.ee.mcgill.ca in pub/mltex
997 Adds a primitive \charsubdef, which allows the following: input of 8-bit
998 characters, participation of accented characters not present in the output
999 encoding in hyphenation, ligatures and kerning with accented letters.
1000 Especially popular in francophone countries.
1001 emTeX supports MLTeX via the /ml option.
1002
1003 9.4. SiSiSi (Wilhelm Barth, Heinrich Nirschl, Heini Hofstaedter und Harald
1004 Mueller)
1005 Available from CTAN: tex-archive/systems/vms (sic!)
1006 Implements another hyphenation algorithm (the name means SIchere
1007 SInnentsprechende SIlbentrennung, which is translated `secure sensitive
1008 hyphenation') specific to the german language (with Haupt- und
1009 Nebentrennstellen). Fails the trip test, therefore not a legitimate TeX.
1010 In use at TU Wien (Austria).
1011
1012 9.5. Japanese TeX
1013 [in preparation]
1014
1015 The End.