From karl@cs.umb.edu Mon Mar 15 04:56:51 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org ([130.44.1.102]) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA08495; Mon, 15 Mar 93 04:56:45 MST Received: from claude.cs.umb.edu by MATH.AMS.ORG (PMDF #2306 ) id <01GVTT1LFB5CH62EBZ@MATH.AMS.ORG>; Mon, 15 Mar 1993 06:33:48 EST Received: by claude.cs.umb.edu id AA06678 (5.65c/IDA-1.4.4 for tex-implementors@math.ams.org); Mon, 15 Mar 1993 06:33:35 -0500 Date: 15 Mar 1993 06:33:35 -0500 From: Karl Berry Subject: system escape for TeX To: karl@cs.umb.edu, tex-implementors@MATH.AMS.ORG Message-Id: <199303151133.AA06678@claude.cs.umb.edu> Content-Transfer-Encoding: 7BIT There has been some discussion recently among some of the NFSS alpha testers about implementing a system escape in TeX via a specially-numbered \write stream. Frank Mittelbach has asked me to forward his most recent message on the topic to tex-implementors, since that is a more appropriate forum. First, below is his original message. From: MZDMZA::MITTELBACH "Frank Mittelbach" To: TOALPHA CC: MITTELBACH Subj: system command (belongs to other lists, really) > I think its cruel to give Frank these schocks of Karl's latest > abomination... roll on the \write18 function i have wanted for ages Is there anybody who would feel hero enough to have this discussion of a \system comand get out of the way? What I mean is the following: a) a system like web2c if it behaves this way is making things quite difficult for maintaining compatibility for sources. I know that a system command is not portable by definition but its interface should be so that the non portable parts could be easily determined. b) I spoke with Don Knuth long about this particular topic in Nov91 in Stockholm, in fact he approached me during one of the walks through the winter snow, because he remembered having seen an article by Wonneberger and me, arguing that a system command is very important in industrial applications. c) He said that he had though about this issue and came to the following conclusion: - if a system command would be implemented via a large numbered write/read stream he would consider this as *not* violating his restrictions of something not being TeX any longer. - Anything else, like an real whatsit doing system calls he would consider as a violation. This would include doing funny things with tfm file names! d) anyway, what we would need would be a standard for all TeX implementations and I would think that having emtex, web2c B{HK}'s VMS obeying this would be a good start. e) I find it very good that such a standard could be achived within the rules posed by Don (I'm not arguing NTS here) so if we could have something that is published and implemented on the important platforms we should make it standard. Even if the information passed will be non standard. This is also very important for ltx3. f) open questions would be - what write stream, vote 99 - what read stream(s), vote 99, 100 - perhaps conventions of return values, eg 99 gives system return value, and 100 gives other stuff if implemented ... ANY taker? This is important in my eyes but I just don't have the time. frank From karl@cs.umb.edu Mon Mar 15 04:56:52 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org ([130.44.1.102]) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA08496; Mon, 15 Mar 93 04:56:45 MST Received: from claude.cs.umb.edu by MATH.AMS.ORG (PMDF #2306 ) id <01GVTT1QGF7KH62975@MATH.AMS.ORG>; Mon, 15 Mar 1993 06:33:54 EST Received: by claude.cs.umb.edu id AA06682 (5.65c/IDA-1.4.4 for tex-implementors@math.ams.org); Mon, 15 Mar 1993 06:33:40 -0500 Date: 15 Mar 1993 06:33:40 -0500 From: Karl Berry Subject: system escape for TeX, II To: karl@cs.umb.edu, tex-implementors@MATH.AMS.ORG Message-Id: <199303151133.AA06682@claude.cs.umb.edu> Content-Transfer-Encoding: 7BIT > Michael Downes: > Perhaps a scheme such as \write-1 to > delete a file, \write-2 to append to a file, \write-3 to rename a > file, . . . ? > Karl Berry: > We could assign positive numbers to this. However, do we really want to > try to provide standard general system operations from within TeX? The > list is infinitely extensible. it is a bit difficult to see the topic of the original mail here. \write-1 *is* defined in TeX to be logfile only, just as a side remark. I'm against providing general operation system operations in this form >From within TeX at least not without much further thoughts. However I'm for providing a system escape that is implemented in the same way on all (hopefully all in the future) systems in the same way and at the same time meets DFon's restrictions. > I'd prefer to just provide the system escape, and let documents which > use it be unportable. I think that's much simpler to implement, easier > to document and understand, and provides almost all of what users want. agreed. > > Obeying a standard convention for system calls, that is, not have one > system using \write18 and another \write17 and another \write99 and > Right. That's why I suggested \write18 instead of \write99. whatever. important is that emtex VMS unix etc will do it in the same way. 17 is definitely bad 18 might be okay, i have no idea what people use for writing to the terminal. > Frank was probably thinking of arranging to have something like > \read99 to\foo > put the return value of the most recent system call into the macro > \foo (0 for success, 1 for error, ... ) > OK, that makes sense. Thanks (to you too, dave) for clarifying this for > me. I suggest that \read18 yield the status (as an integer) of the last > command, except that if the command succeeds, it yields the empty > string. That way success can be tested in TeX independently of whether > the OS uses 0 or 1. fine with me. > An alternative would be to for \read18 to yield an error string (or > empty) instead of an integer. on some systems the return code could be quite meaningful, so it is probably a good concept to use. Also from the TeX point of view it is easy to handle later on. [karl here -- so do you prefer numbers or strings as the return code?] > And also pipe the standard output into input stream 100 in some way, > so that you could do successive \read100 to\bar to read successive > lines of the output from the system call. > I don't have any feel for whether this is worth the (major) trouble of > implementing. there are important applications that would benefit from such an interface (again only if provided by all major installations in some form). You could of course get a similar effect by making the system command write to a file and then read that file back but this would be less efficient I guess. For ltx3 I would be glad to have it. So I toss this back to implementors :-) [karl here again -- I suspect I'm simply ignorant of all the possibilities, but I can't see a good way to implement this under Unix.] > If others feel that \read18 returning the status, either as an integer > or a string, is important, than I would go along with that, but I'm not > pushing it myself. yes definitely, I have done too much document processing in industrial environments where so much has to be automated and will not be checked by human eyes until it is often too late. Having features in the software that help you doing such checks is important. cheers Frank From CHAA006@VAX.RHBNC.AC.UK Mon Mar 15 10:44:06 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA14499; Mon, 15 Mar 93 10:44:00 MST Received: from sun2.nsfnet-relay.ac.uk by MATH.AMS.ORG (PMDF #2306 ) id <01GVU536O46OH62KNO@MATH.AMS.ORG>; Mon, 15 Mar 1993 12:19:32 EST Date: 15 Mar 1993 16:50:47 +0000 (GMT) From: CHAA006@VAX.RHBNC.AC.UK Subject: Re: A system interface for TeX, via \write Sender: "JANET CHAA006@UK.AC.RHBNC.VAX" To: tex-implementors Reply-To: Philip Taylor (RHBNC) Message-Id: <20220898_00075B40.009698DA704E47A4$40_24@UK.AC.RHBNC.VAX> Content-Transfer-Encoding: 7BIT Via: uk.ac.rhbnc.vax; Mon, 15 Mar 1993 16:56:20 +0000 Actually-To: Originally-To: @SYSTEM Mailer: Janet_Mailshr V3.5 ( 13-OCT-1989 14:07:27 ) I really do find it very depressing that Don should have acceded to the abuse of \write for the purposes of implementing a *\system command; the TeX book (pages 226, 280) make it quite plain that a \write to a stream associated with a positive integer greater than 15 will result in the tokens being written to the user's terminal and the log file. To then allow a system-dependent interpretation of these tokens, and (so the subsequent discussion would suggest), a subsequent abuse of \read to get the results of this system- dependent interpretation seems totally alien to the general philosophy of TeX. I do, on the other hand, fully understand why so many want a system interface; I believe that it would, at a stroke, solve many of the problems for which specific extensions are already being discussed: to obtain, for example, the bounding-box of a graphics object. But to achieve this at the expense of what can only be termed a bodge seems truly indefensible to me. The alternative is, of course, an genuine extension to TeX: an authentic (and properly thought out), \system command. Of course, such an extension cannot be a part of TeX: `[Knuth's] work on TeX and MetaFont is complete, and no further changes will be made' (Knuth, 1990). But such a change could be implemented in a totally TeX-compatible program: an ``extended-TeX'', for example. At the DANTE conference which took placed at Chemnitz last week, the NTS (`New Typesetting System') project which was established under the aegis of DANTE was discussed, and I presented a paper entitled ``The future of TeX'', which was a synthesis of my talk at Prague and my subsequent thoughts on the NTS project. I am now co-ordinator for the NTS project (Rainer Schoepf having stood down), and I propose to make a formal proposal to the NTS list members that work on a totally compatible ``extended-TeX'' should be commenced immediately, with the \system primitive featuring as an immediate goal. My idea is that rather than wait for an ``all-singing, all dancing'' NTS, the group should develop, in a stepwise manner, small but significant enhancements to TeX (particularly in the area of completeness, where some highly desirable features, analogous to those already present, are omitted: for example, the destructors necessary to totally a vlist, by providing appropriate classes of register (e.g. \mark and \write objects)). Obviously the repercussions of an ``extended-TeX'' project need full and proper discussion, and these individual messages can only complement, rather than take the place of, such discussion. But I thought it right and proper to bring this proposal to those who are most directly concerned, and seek some immediate feedback: do the readers of this message believe that a totally compatible extended-TeX is a worthwhile project, and if so, would they support the early implementation of a \system command in e-TeX, rather than support the proposed abuse of \read and \write in TeX-proper? Philip Taylor, RHBNC. From lrw!leichter@lrw.com Mon Mar 15 20:32:24 1993 Flags: 000000000011 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA28005; Mon, 15 Mar 93 20:32:19 MST Received: from uu3.psi.com by MATH.AMS.ORG (PMDF #2306 ) id <01GVUPBQLRK0H62KVJ@MATH.AMS.ORG>; Mon, 15 Mar 1993 21:58:16 EST Received: from lrw.UUCP by uu3.psi.com (5.65b/4.0.071791-PSI/PSINet) via UUCP; id AA26000 for ; Mon, 15 Mar 93 21:20:45 -0500 Received: by lrw.UUCP (DECUS UUCP w/Smail); Mon, 15 Mar 93 21:10:20 EDT Date: 15 Mar 1993 21:10:20 -0400 (EDT) From: Jerry Leichter Subject: "system" interface for TeX To: TEX-IMPLEMENTORS@MATH.AMS.ORG Message-Id: <9303160220.AA26000@uu3.psi.com> Content-Transfer-Encoding: 7BIT X-Vms-Mail-To: TEX-IMPLEMENTORS@MATH.AMS.ORG I think having a "system interface" available from TeX, in a "as portable as possible" form, is an excellent idea. I do NOT like the idea of using some arbitrary high file number; nor do I think this needs to wait for a TeX extension. I'll suggest an alternative, but one other point first: There MUST be some simple, portable, documented method for turning this new feature off. Even further: There should be a method for turning it ON; it should be OFF by default. "Trojan horse" docu- ments are just too dangerous. If TeX contained a method for executing arbitrary system code, and I could not turn it off, I would NEVER TeX a document sent to me by someone I didn't know, or retrieved from the net. There are already dangers from TeX, which can open arbitrary files. This issue has been discussed, and ways to make TeX much safer (e.g., making it impossible for TeX to write to files outside the current default directory unless explicit permission is given) have been proposed, but as far as I know, none has been implemented. It is ESSENTIAL that an interface that is, or can be set, to be secure BY DEFAULT be chosen before such a powerful tool for the nasty people out there is made available. All that said: Rather than either defining a new built-in, command, or picking some arbitrary file number. I'd much rather see an agreed-upon convention for a file "name" that opens a stream to the operating system. For example: \newout\commands \openout\commands=// \newin\results \openin\results=// Anything written to \commands will be interpreted as one or more operating system commands. After commands have been written to \commands, one or more lines of results (whatever that means for the given OS - probably something like what the commands wrote to standard output) may be read from \results. For operating systems where this is useful, some specially-formatted line can contain an integer encoding a system status. (Special formatting is easy to accomplish - start such a line with a character with catcode 9, which cannot otherwise occur in the result of \read.) As long as \results is not read "past its end", one can keep writing commands to \commands and having the results appear in \results. "//" is not a legal file name in any operating system I know of; if it bothers anyone, there are plenty of other possible choices. (It's useful to use "/" in the name because Unix systems nominally allow anything but "/" and the ASCII 0 character, and the latter is too much of a bother to use.) To make things completely independent of the file system, we could use a "name" that's some primitive, a construction that is currently illegal (a name must consist of spaces and character tokens). An attempt to open multiple instances of "//" are rejected, exactly as if the subsequent attempts specified an inaccessible file. Reading "//" when no commands have been written produces an immediate EOF. (An EOF here means that TeX knows for certain that no further data will become available. A write to "//" might start a background process; a read when nothing else is available will wait for that process to finish, perhaps producing results.) If no "//" input file has been opened at the time commands are written to "//" any results are lost. Closing "//" opened for input discards anything buffered for it. This way, there is no need for the implementation to find someplace to buffer lines of data that the program may, or may not, later get around to looking at. (Closing "//" opened for output has no side-effects; again, there might still be some background processing going on.) I contend that, except for the suggested mild extensions like special catcodes and primitives as file names, these extensions completely consistent with the definition and spirit of TeX. TeX does not, and cannot possibly, define what a "file" is. On Plan 9, I'm sure one could actually create something that the OS itself considered to be a file which would have precisely these semantics. One can almost (but not quite) do this today on Unix or VMS by opening a pseudoterminal. Besides putting the "magic cookie" in the (unspecified) file name space, rather than in the precisely defined file number space, this scheme can also be implemented entirely in the I/O modules, which already have to be tailored for each system. No changes to the TeX code itself are necessary (unless the special hacks are desired). -- Jerry From barry@bluesky.com Mon Mar 15 21:59:48 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA29149; Mon, 15 Mar 93 21:59:45 MST Received: from uu6.psi.com by MATH.AMS.ORG (PMDF #2306 ) id <01GVUT1JKSFKH62PO1@MATH.AMS.ORG>; Mon, 15 Mar 1993 23:44:32 EST Received: by uu6.psi.com (5.65b/4.0.071791-PSI/PSINet) via UUCP; id AA08862 for ; Mon, 15 Mar 93 23:50:58 -0500 Received: by bluesky.com (5.64/Inherent1.1Mailhost) id AA06393; Mon, 15 Mar 93 20:23:42 PST Date: 15 Mar 1993 20:23:42 -0800 (PST) From: Barry Smith Subject: "system" interface for TeX To: TEX-IMPLEMENTORS@MATH.AMS.ORG Message-Id: <9303160423.AA06393@bluesky.com> Content-Transfer-Encoding: 7BIT I will briefly say that I agree, more or less in toto, with Jerry Leichter in preferring the use of the file name rather than the channel number. May I further extend his suggestion by offering the use of additional filenames to define the services requested/offered, e.g., one might open a channel to "//directory" to read the filesystem current directory. Barry Smith Blue Sky Research barry@bluesky.com From MITTELBACH@MZDMZA.ZDV.UNI-MAINZ.DE Wed Mar 17 14:19:43 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA23055; Wed, 17 Mar 93 14:19:36 MST Received: from MZDMZA.ZDV.UNI-MAINZ.DE (vzdmzx.zdv.Uni-Mainz.DE) by MATH.AMS.ORG (PMDF #2306 ) id <01GVX532H1QOH62R8D@MATH.AMS.ORG>; Wed, 17 Mar 1993 15:51:02 EST Received: from MZDMZA.ZDV.UNI-MAINZ.DE by MZDMZA.ZDV.UNI-MAINZ.DE (PMDF #12046) id <01GVXHK3SC1CAJKLXF@MZDMZA.ZDV.UNI-MAINZ.DE>; Wed, 17 Mar 1993 21:48 GMT +0100 Date: 17 Mar 1993 21:48 +0000 (GMT) From: Frank Mittelbach Subject: Re: write stream for system interface To: TEX-IMPLEMENTORS@MATH.AMS.ORG Message-Id: <01GVXHK3SC1CAJKLXF@MZDMZA.ZDV.UNI-MAINZ.DE> X-Vms-To: TOTEXIMPL X-Vms-Cc: MITTELBACH Content-Transfer-Encoding: 7BIT > I will briefly say that I agree, more or less in toto, with Jerry > Leichter in preferring the use of the file name rather than the channel > number. let me just explain one of the reson Don gave for using a write stream: it would allow to run such a file on tex installations not having this extension and the result would be printed on the terminal or requested from the user (ie when the \read for getting information back is used). This would not be true for when defining a special "file name" as the interface. In that case the user would get a nasty error message. I'm therefore more in favour of Don's suggestion. However, I very much wish to have this feature available for ltx3 (implemented on as many as possible platforms in the same fasion when ltx3 is ready) and if there would be an agreement to do it as Jerry suggested this would be okay with me too, provided it is consistently done. Jerry was also concerned about security. This is certainly an important problem and should be considered. I think on VM the solution currently taken is to explicitly need a \openin for the stream in question within the first five source code lines, so something. I'm sure Peter Breitenlohner can fill in the details. > May I further extend his suggestion by offering the use of additional > filenames to define the services requested/offered, e.g., one might > open a channel to "//directory" to read the filesystem current directory. This would need considerable additional thoughts since, as Karl already pointed out, you can dream up any type of services, and while such an interface might be worth having it would need to be the same on all systems to prove useful. If it is not compatible I can otherwise just use the simple interface and request the service by hand. It may be better (but I'm not sure) to just decide on a simple standard operating interface and later on plug on top of this interface a special syntax that requests standard services without using the actual operating system syntax (they would therefore be portable). For example using write stream 99 \immediate\write99{ [] } Frank Mittelbach From lrw!leichter@lrw.com Wed Mar 17 19:14:25 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA26543; Wed, 17 Mar 93 19:14:20 MST Received: from uu3.psi.com by MATH.AMS.ORG (PMDF #2306 ) id <01GVXFW6ODSGH62QUR@MATH.AMS.ORG>; Wed, 17 Mar 1993 21:00:47 EST Received: from lrw.UUCP by uu3.psi.com (5.65b/4.0.071791-PSI/PSINet) via UUCP; id AA12044 for ; Wed, 17 Mar 93 20:24:05 -0500 Received: by lrw.UUCP (DECUS UUCP w/Smail); Wed, 17 Mar 93 20:23:46 EDT Date: 17 Mar 1993 20:23:46 -0400 (EDT) From: Jerry Leichter Subject: Re: write stream for system interface To: TEX-IMPLEMENTORS@MATH.AMS.ORG Message-Id: <9303180124.AA12044@uu3.psi.com> Content-Transfer-Encoding: 7BIT X-Vms-Mail-To: UUCP%"MITTELBACH@MZDMZA.ZDV.UNI-MAINZ.DE" > I will briefly say that I agree, more or less in toto, with Jerry > Leichter in preferring the use of the file name rather than the > channel number. let me just explain one of the reson Don gave for using a write stream: it would allow to run such a file on tex installations not having this extension and the result would be printed on the terminal or requested from the user (ie when the \read for getting information back is used). This would not be true for when defining a special "file name" as the interface. In that case the user would get a nasty error message. I'm therefore more in favour of Don's suggestion. I think this is repeating the same mistake made in many drivers with \special, of silently ignoring a command that might render the output meaningless. In the special write stream version, if the extension is not available, a mean- ingless string gets written to the console, and the resulting TeX file may or may not work. In the special file name version, a non-extended TeX can't read the file, and asks the user for a file name to replace the meaningless one shown. If necessary, the user can type NULL - that's just what NULL.TEX is there for. The resulting TeX run may or may not succeed, but at least you're on notice, *in exactly the same way you are on notice when you try to LaTeX a file that uses a style file you don't have*: If you are knowledgeble and want to try your luck, you can tell LaTeX to read NULL.TEX in place of the style file and hope for the best. However, I very much wish to have this feature available for ltx3 (implemented on as many as possible platforms in the same fasion when ltx3 is ready) and if there would be an agreement to do it as Jerry suggested this would be okay with me too, provided it is consistently done. Nelson Beebe and I had a bit of a further discussion on this subject. He pointed out that my suggested "//" had meaning on an Apollo system - which I knew, actually, but it makes little difference, since while "//" does have a MEANING - it's a "network-wide" root, rather than your local root - it is not, on its own, the name of a file (or at least not of a file you would want to read). We did, however, also discuss the alternative of using a control sequence as (part of) a "filename". A good choice would be a \special: \openout\commands=\special or, to follow Barry Smith's (I think it was) suggestion, you could even do things like: \openout\commands=\special directory This has the major advantage of looking very much like normal uses of \special but in a different context, so it "makes sense". There are two difficulties: - There is already a meaning for this string in TeX: It opens the file with the empty name as \commands, then does a \special. Admittedly, this is VERY unlikely to appear in any existing code, so it may not be that big a deal. Unfortunately, this also means that if this code is fed to an unextended TeX, it will "work", perhaps without complaint, but do something strange. - The code in TeX will only accept character tokens as file name constituents. (The system-specific code can be even more picky, but it will never be handed anything but character tokens.) This would have to be changed; a convention based entirely on character tokens would require changes only to the system-dependent code. Jerry was also concerned about security. This is certainly an important problem and should be considered. I think on VM the solution currently taken is to explicitly need a \openin for the stream in question within the first five source code lines, so something. I'm sure Peter Breitenlohner can fill in the details. Decent uses of such a facility, like decent uses of \special, would be best hidden in macro packages. I don't think something as simple as a requirement that the \openin occur in the first five lines will work. > May I further extend his suggestion by offering the use of > additional filenames to define the services requested/offered, e.g., > one might open a channel to "//directory" to read the filesystem > current directory. This would need considerable additional thoughts since, as Karl already pointed out, you can dream up any type of services, and while such an interface might be worth having it would need to be the same on all systems to prove useful. If it is not compatible I can otherwise just use the simple interface and request the service by hand. For the most part, I agree. But perhaps one should also consider how this compares to \special, which offers, in principle, many kinds of services. (Then again, \special's would be *so* much more useful if there were a decent, agreed-upon set of \special's that were "commonly supported".) It may be better (but I'm not sure) to just decide on a simple standard operating interface and later on plug on top of this interface a special syntax that requests standard services without using the actual operating system syntax (they would therefore be portable). For example using write stream 99 \immediate\write99{ [] } Looks much like the "standards" for \special, doesn't it? -- Jerry From BNB@MATH.AMS.ORG Thu Mar 18 07:23:37 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org ([130.44.1.102]) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA06123; Thu, 18 Mar 93 07:23:34 MST Received: from MATH.AMS.ORG by MATH.AMS.ORG (PMDF #2306 ) id <01GVY4PGKI28HL1A3K@MATH.AMS.ORG>; Thu, 18 Mar 1993 09:16:30 EST Date: 18 Mar 1993 09:16:23 -0500 (EST) From: bbeeton Subject: re: discussion about system calls To: tex-implementors@MATH.AMS.ORG Cc: P.Taylor@Vax.Rhbnc.Ac.Uk Message-Id: <732464183.401522.BNB@MATH.AMS.ORG> Content-Transfer-Encoding: 7BIT Mail-System-Version: a discussion about the desirability of/problems with/etc. system calls in tex (or successor) is now proceeding on the list nts-l as well as on tec-implementors. i am not going to intervene in the nts-l discussion (which was instigated by a message from phil taylor). however, if the participants on tex-implementors would like to have the messages to nts-l forwarded to this list, let me know (directly, please; no need to flood the list); if there is sufficient or strong enough interest, i will package the messages that have already appeared and forward later ones. if only one or two readers express interest, i am willing to send the current flock of messages to them as individuals, and follow up with another batch next week. (i will be out of town from march 27-april 3, but i will see if i can persuade phil to carry on in my absence, if there's a call for it.) -- bb From yannis@gat.citilille.fr Mon Apr 5 14:02:46 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA00468; Mon, 5 Apr 93 14:02:41 MDT Received: from lilserv.citilille.fr by MATH.AMS.ORG (PMDF #2306 ) id <01GWNOA0G6G0HV13GL@MATH.AMS.ORG>; Mon, 5 Apr 1993 15:40:48 EST Received: from gat.citilille.fr by lilserv.citilille.fr Mon, 5 Apr 1993 21:38:06 +0200 Received: by gat.citilille.fr Mon, 5 Apr 93 21:42:46 +0200 Date: 05 Apr 1993 21:42:46 +0200 From: yannis@gat.citilille.fr (Yannis Haralambous) Subject: About filters and encodings To: TWGMLC-L@irlearn.ucd.ie, tex-implementors@MATH.AMS.ORG Message-Id: <01GWNOA0MLXEHV13GL@MATH.AMS.ORG> Content-Transfer-Encoding: 7BIT About FILTERS ============= I'm sending this message both to the discussion list of the Technical Working Group on Multiple Language Coordination as to the tex-implementors list. It is a well known and very important fact that all TeX input can be expressed in 7-bit ASCII. Characters between positions 0x80 and 0xFF can be input using the notation ^^xy; also most of the characters with diacritics can be input by ---usually small--- macros like \', \`, \^, etc. Some of these macros have been defined by Don Knuth, a few new ones have been defined in my paper in TTN, others remain to be fixed (and it is the job of linguistic subgroups of TWGMLC to do this). It would be nice if we could stop here: 7-bit ASCII is a universal standard, and this makes gives TeX the highest degree of portability. But unfortunately real life is more complicated. In several countries of the world (countries with other languages than the one I'm currently writing) 8-bit encodings are used. In some cases these encodings are not absolutely necessary but make life easier: the case of Dutch for example, where accented letters are quite rare. In other cases, 8-bit input is unavoidable: for example in Czech, where a text written using Dons standard macros is unreadable. There are several problems around this fact; first of all, for one language there are more than one 8-bit encodings; actually there are zillions of them in the world. Second, there can be more than one encodings used in the same document: old console machines wouldn't allow this, but modern windowing systems allow several display fonts in the same window, and each font can very well be encoded in a different way; keyboard maps can also be changed on the fly, so having a document with text in ISO8859-1, and ISO8859-2 and ISO8859-xx happens more and more often. TeX systems can solve this problem in two ways: 1) using active characters. All characters in the range 0x80 -- 0xff become active. Every time you change the script, you change also their expansions, as well as \uccode and \lccode values. 2) using a filter: an external program reads every TeX input file and replaces 8-bit characters by 7-bit macros. Here are the advantages and disadvantages of these methods: (1) doesn't need an external program; but the fact of having a lot of active characters slows TeX down; input files remain 8-bit and hence non-portable; we cannot add any more intelligence to this system; TeX is frozen, so we must do with what we have, and in this case it is certainly not much... (2) needs an external program, but a very small and quick one; it gives us unlimited possibilities since we can add more and more intelligence to this program (written by us, and hence not "frozen"); it converts local files to portable ones; TeX has less and cleaner work to do. Here is an example of necessary additional intelligence: Arabic and Hebrew are written from right-to-left. TeX--XeT can handle that situation like a doll. On newest Mac, Windows, and X there are Arabic and Hebrew systems, allowing input in the original script. That input is made out of 8-bit characters. In theory we would only need to give this to TeX and bingo. Well no: although Arabic/Hebrew is written from right to left, TeX will still read it from left to right, and on every line break the order of words will be wrong: suppose we have 20 Arabic/Hebrew words; using newlines every time we get to the limit of our screen we obtain something like: word7 word6 word5 word4 word3 word2 word1 word12 word11 word10 word9 word8 word15 word14 word13 When TeX reads this, the words will be in the order: 7-6-5-4-3-2-1-12-11-10-9-8-15-14-13. This would not happen is we hadn't used newlines, but this cannot be avoided on many editors, and after all we cannot ask users "do not use newlines"; it's against the philosophy of TeX. So here is what to do: in the input file, never put Arabic/Hebrew text on the same line as Latin text; a utility will see which lines have 8-bit chars, and invert these lines. Then TeX--Xet will do the rest. It works! Other kind of intelligence added to the filter would involve Chinese/Japanese characters, where 16-bit code can be converted to +. In any case, a filter is an open door to future additions for languages of the world; while frozen current TeX is rather a closed door. And I'm not speaking of future NTS etc, I'm talking of things we can do (and need) now. So my message is: we should very seriously consider including filters in our TeX distributions. Of course some strict conditions have to be satisfied: --1. the program is written in some WEB, by one person, which supports and upgrades it; (like Tom does for dvips) --2. the utility reads the data for each script from configuration files. Configuration files must have the same syntax on all systems. They correspond to encodings, and are called by preprocessor-directives. --3. These preprocessor-directives must be standardized. On each system there will be a default value (for those who don't need to change the encoding) depending on the machine and the language spoken at location. The only problem with filters is that a TeX file can have \input and \read commands; the filter must be operating on all of them. The big advantages for TeX Language Packages are the following: a) in a TeX Language Package we will only include a filter for every encoding used in the countries where the language is spoken. For example, for France we may include a filter for "Macintosh Standard Roman", for "PC codepage ???" and for "ISO8859-1". These filters will be very short text files. We can also include executables for small computers. b) having filters allows us to include documentation in 8-bit text; why? because one 8-bit text can be easily converted into another 8-bit text--- on the contrary, 7-bit text will always remain unreadable since we hardly can go back. I hope to have maked it clear why TeXs xchar and xord are not enough (and why Mattes' emTeX filtering mechanism is not enough either): the encoding may change several times in the document, so the utility must be intelligent enough to store the configuration data for every encoding and switch hence and forth, according to the preprocessor- directives. I would like to hear the opinions of TeX-implementors as well those of TLP developpers: are you for * filters, as described * active characters * some third possibility, and which one? To conclude I would like to insist on one point: either we choose filters or active characters or something else, our approach must be homogeneous for **all** TeX implementations, and absolutely definitely standardized. Thank you for having read this long message, Cheers Yannis From yannis@gat.citilille.fr Tue Apr 6 03:27:06 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA14460; Tue, 6 Apr 93 03:27:02 MDT Received: from lilserv.citilille.fr by MATH.AMS.ORG (PMDF #2306 ) id <01GWODGFOXW0HV1507@MATH.AMS.ORG>; Tue, 6 Apr 1993 03:42:13 EST Received: from gat.citilille.fr by lilserv.citilille.fr Tue, 6 Apr 1993 09:39:20 +0200 Received: by gat.citilille.fr Tue, 6 Apr 93 09:43:59 +0200 Date: 06 Apr 1993 09:43:59 +0200 From: yannis@gat.citilille.fr (Yannis Haralambous) Subject: Re: About filters and encodings To: DHOSEK@HMCVAX.CLAREMONT.EDU Cc: tex-implementors@MATH.AMS.ORG, twgmlc-l@irlearn.ucd.ie Message-Id: <01GWODGFUKFMHV1507@MATH.AMS.ORG> Content-Transfer-Encoding: 7BIT | From DHOSEK@HMCVAX.CLAREMONT.EDU Tue Apr 6 03:29:06 1993 | Subject: Re: About filters and encodings | To: yannis@gat | Cc: twgmlc-l@irlearn.ucd.ie, tex-implementors@math.ams.org | X-Vms-To: IN%"yannis@gat.citilille.fr" | X-Vms-Cc: IN%"twgmlc-l@irlearn.ucd.ie",IN%"tex-implementors@math.ams.org" | Mime-Version: 1.0 | Content-Transfer-Encoding: 7BIT | | -order: 7-6-5-4-3-2-1-12-11-10-9-8-15-14-13. | -This would not happen is we hadn't used newlines, | -but this cannot be avoided on many editors, and | -after all we cannot ask users "do not use newlines"; | -it's against the philosophy of TeX. | | There's something wrong here: If an editor really stores R-L text | as you describe, it's useless except for the most rudimentary | WYSIWYG tasks. Not to mention that there's also an implied 4321 | order for words which are read 1234 given the above scheme. Is | this really so? If this is the case the only practical answer is | to tell users that they have an impracticable input mechanism, | use seomthing else. This is really not that unreasonable a | request. I have vague recollections of other editors which have | been given the same verdict (and these editors have since | vanished in the haze of obscurity). OK, we can always say that this or that is insuitable with TeX, but the method described above is Apples Arabic/Hebrew system when used in conjunction of the most fundamental MPW (Macintosh Programming Workshop). It is not some silly public domain R-L editor we can ignore. | | For eight-bit languages, this gives a great deal of flexibility | which may not be available elsewhere. I'd hate to think of all | the details that would go into a filter which get taken care of | automatically with active characters, e.g., uppercasing, input | streams, etc. Not to mention the difficulty of filters with an | integrated system like Textures. | Input streams are the only problem I see. The \uppercase primitive has to be rewritten in form of a macro anyway since it is definitely anti- multilingual. Filters as I see them should be very elementary, just replacing 8-bit characters by TeX macros. Advanced features will be included for exotic languages: for ex. I need a filter for Khmer, and for Amharic etc And concerning Textures, I think it is following a different philosophy focalizing on speed and voluntarily ignoring innovations like TeX--XeT, virtual fonts (or is there something new?), etc etc. It shouldn't be taken as an example, since it is quite unique in his kind. | -* some third possibility, and which one? | | Well let's make sure that the NTS people get it right. The Technical Working Group on MUltiple Language Coordination is working now and wants to produce results now, not in an indefinite future. If NTS simplifies the situation, OK, but in the meantime we cannot sit down and wait | | -To conclude I would like to insist on one point: either | -we choose filters or active characters or something else, | -our approach must be homogeneous for **all** TeX | -implementations, and absolutely definitely standardized. | | I don't know that I necessarily agree with the requirement of | homogeneity. I have systems which use filters but for specialized | purposes, e.g., handling 16-bit input character sets. For more | prosaic tasks, like handling western European languages, there's | no need for the filter and its use would only slow things down. Do you often write in western European languages? What do *you* propose for such "prosaic tasks" as western European languages? do you expect the average French TeX user to type in things like d\'eg\'en\'er\'e, just because he happened to be born in France and TeX happened to be written in the US? | | -dh | From CHAA006@VAX.RHBNC.AC.UK Tue Apr 6 05:32:02 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA17892; Tue, 6 Apr 93 05:31:51 MDT Received: from sun2.nsfnet-relay.ac.uk by MATH.AMS.ORG (PMDF #2306 ) id <01GWOK6PFJCGHV0XJN@MATH.AMS.ORG>; Tue, 6 Apr 1993 06:54:22 EST Date: 06 Apr 1993 11:51:39 +0000 (GMT) From: CHAA006@VAX.RHBNC.AC.UK Subject: Yannis' MLC discussion document and the NTS project Sender: "JANET CHAA006@UK.AC.RHBNC.VAX" To: tex-implementors Reply-To: Philip Taylor (RHBNC) Message-Id: <22C0BCE7_00078FF0.0096A9FA4BEBF420$18_2@UK.AC.RHBNC.VAX> Content-Transfer-Encoding: 7BIT Via: uk.ac.rhbnc.vax; Tue, 6 Apr 1993 11:51:47 +0100 Actually-To: Originally-To: $TEX-IMPLEMENTORS,$TWG-MLC Mailer: Janet_Mailshr V3.5 ( 13-OCT-1989 14:07:27 ) dh| Well let's make sure that the NTS people get it right. yh| The Technical Working Group on MUltiple Language Coordination is working yh| now and wants to produce results now, not in an indefinite future. If NTS yh| simplifies the situation, OK, but in the meantime we cannot sit down and yh| wait I can reassure members of the the TWG MLC that the NTS project, too, wants to produce results _now_, not in an indefinite future! In all seriousness, the NTS project has been reorganised with myself as co-ordinator, and I have two primary aims for the project: a) 100% backward compatibility, and b) some immediate and tangible results (e.g. a first release of NTS within the next twelve months). I would not for a moment suggest that the TWG MLC should _depend_ on NTS, but input from TWG MLC to the NTS project will be much appreciated. Philip Taylor, RHBNC Co-ordinator, NTS project. From DHOSEK@HMCVAX.CLAREMONT.EDU Mon Apr 5 19:44:16 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA08653; Mon, 5 Apr 93 19:44:12 MDT Received: from HMCVAX.CLAREMONT.EDU by MATH.AMS.ORG (PMDF #2306 ) id <01GWO0AZJA2OHV1335@MATH.AMS.ORG>; Mon, 5 Apr 1993 21:25:14 EST Received: from HMCVAX.CLAREMONT.EDU by HMCVAX.CLAREMONT.EDU (PMDF #2326 ) id <01GWNT6K4C2E9GV5V4@HMCVAX.CLAREMONT.EDU>; Mon, 5 Apr 1993 18:24:56 PST Date: 05 Apr 1993 18:24:56 -0800 (PST) From: Don Hosek Subject: Re: About filters and encodings To: yannis@gat.citilille.fr Cc: twgmlc-l@irlearn.ucd.ie, tex-implementors@MATH.AMS.ORG Message-Id: <01GWNT6K4C2G9GV5V4@HMCVAX.CLAREMONT.EDU> X-Vms-To: IN%"yannis@gat.citilille.fr" X-Vms-Cc: IN%"twgmlc-l@irlearn.ucd.ie",IN%"tex-implementors@math.ams.org" Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT -Here is an example of necessary additional -intelligence: Arabic and Hebrew are written from -right-to-left. TeX--XeT can handle that situation -like a doll. On newest Mac, Windows, and X -there are Arabic and Hebrew systems, allowing -input in the original script. That input is made -out of 8-bit characters. In theory we would only -need to give this to TeX and bingo. Well no: -although Arabic/Hebrew is written from right -to left, TeX will still read it from left to right, -and on every line break the order of words will be -wrong: suppose we have 20 Arabic/Hebrew words; -using newlines every time we get to the limit -of our screen we obtain something like: -word7 word6 word5 word4 word3 word2 word1 - word12 word11 word10 word9 word8 - word15 word14 word13 -When TeX reads this, the words will be in the -order: 7-6-5-4-3-2-1-12-11-10-9-8-15-14-13. -This would not happen is we hadn't used newlines, -but this cannot be avoided on many editors, and -after all we cannot ask users "do not use newlines"; -it's against the philosophy of TeX. There's something wrong here: If an editor really stores R-L text as you describe, it's useless except for the most rudimentary WYSIWYG tasks. Not to mention that there's also an implied 4321 order for words which are read 1234 given the above scheme. Is this really so? If this is the case the only practical answer is to tell users that they have an impracticable input mechanism, use seomthing else. This is really not that unreasonable a request. I have vague recollections of other editors which have been given the same verdict (and these editors have since vanished in the haze of obscurity). -So here is what to do: in the input file, never put -Arabic/Hebrew text on the same line as Latin text; -a utility will see which lines have 8-bit chars, -and invert these lines. Then TeX--Xet will do the -rest. It works! Yes, but it's dramatically inadequate and a pain. For example, the following text where uppercase indicates Hebrew and lower case Latin letters is typeset rather differently depending on whether the Latin is considered part of the Hebrew quotation or not: YA'AQOV and LABAN plus it seems like there might be some L-R-centrism in the above scheme. There is an article in C. ACM July 1987 on Arabic Word Processing which outlines a lot of the difficulties involved in mixed directional typesetting. Most of them go away quite nicely if one simply explicitly marks R-L text (or L-R in an R_L context). Your plan would not adequately allow this and I think that it dramatically overlooks the possibility of nesting of R-L/L-R contexts, i.e., \RL{ABC \LR{DEF} GHI} is not the same as \RL{ABC} DEF \RL{GHI} the first would be typeset IHG DEF CBA the second as CBA DEF GHI This is not to say that filters don't have value, just to point out the limitations of this particular approach. Given the relative esoterocity of this, though, we might want to move it to ivritex-l. -* filters, as described There's a place, but specialized. -* active characters For eight-bit languages, this gives a great deal of flexibility which may not be available elsewhere. I'd hate to think of all the details that would go into a filter which get taken care of automatically with active characters, e.g., uppercasing, input streams, etc. Not to mention the difficulty of filters with an integrated system like Textures. -* some third possibility, and which one? Well let's make sure that the NTS people get it right. -To conclude I would like to insist on one point: either -we choose filters or active characters or something else, -our approach must be homogeneous for **all** TeX -implementations, and absolutely definitely standardized. I don't know that I necessarily agree with the requirement of homogeneity. I have systems which use filters but for specialized purposes, e.g., handling 16-bit input character sets. For more prosaic tasks, like handling western European languages, there's no need for the filter and its use would only slow things down. -dh From DHOSEK@HMCVAX.CLAREMONT.EDU Tue Apr 6 19:03:16 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA08571; Tue, 6 Apr 93 19:03:12 MDT Received: from HMCVAX.CLAREMONT.EDU by MATH.AMS.ORG (PMDF #2306 ) id <01GWPD72MKI8HV1921@MATH.AMS.ORG>; Tue, 6 Apr 1993 20:45:29 EST Received: from HMCVAX.CLAREMONT.EDU by HMCVAX.CLAREMONT.EDU (PMDF #2326 ) id <01GWP6GFKT8S9GV8LM@HMCVAX.CLAREMONT.EDU>; Tue, 6 Apr 1993 17:45:12 PST Date: 06 Apr 1993 17:45:12 -0800 (PST) From: Don Hosek Subject: Re: About filters and encodings To: yannis@gat.citilille.fr Cc: twgmlc-l@irlearn.ucd.ie, tex-implementors@MATH.AMS.ORG Message-Id: <01GWP6GFKT8U9GV8LM@HMCVAX.CLAREMONT.EDU> X-Vms-To: IN%"yannis@gat.citilille.fr" X-Vms-Cc: IN%"twgmlc-l@irlearn.ucd.ie",IN%"tex-implementors@math.ams.org" Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT From: yannis@gat.citilille.fr (Yannis Haralambous) .| -order: 7-6-5-4-3-2-1-12-11-10-9-8-15-14-13. .| -This would not happen is we hadn't used newlines, .| -but this cannot be avoided on many editors, and .| -after all we cannot ask users "do not use newlines"; .| -it's against the philosophy of TeX. .| .| There's something wrong here: If an editor really stores R-L text .| as you describe, it's useless except for the most rudimentary .| WYSIWYG tasks. Not to mention that there's also an implied 4321 .| order for words which are read 1234 given the above scheme. Is .| this really so? If this is the case the only practical answer is .| to tell users that they have an impracticable input mechanism, .| use seomthing else. This is really not that unreasonable a .| request. I have vague recollections of other editors which have .| been given the same verdict (and these editors have since .| vanished in the haze of obscurity). .OK, we can always say that this or that is insuitable with TeX, but .the method described above is Apples Arabic/Hebrew system when used .in conjunction of the most fundamental MPW (Macintosh Programming .Workshop). It is not some silly public domain R-L editor we can ignore. Well I would submit that the MPW editor is (1) not most fundamental (if I had a dollar for every time someone has objected to my saying this or that tool is available by responding that it requires MPW and few people have it) and (2) clearly not designed for text processing. No other bidirectional editor I've encountered has this property and for good reason: it makes _doing_ anything with the text well-nigh impossible. .| For eight-bit languages, this gives a great deal of flexibility .| which may not be available elsewhere. I'd hate to think of all .| the details that would go into a filter which get taken care of .| automatically with active characters, e.g., uppercasing, input .| streams, etc. Not to mention the difficulty of filters with an .| integrated system like Textures. .Input streams are the only problem I see. The \uppercase primitive has .to be rewritten in form of a macro anyway since it is definitely anti- .multilingual. Filters as I see them should be very elementary, just .replacing 8-bit characters by TeX macros. Advanced features will be .included for exotic languages: for ex. I need a filter for Khmer, and .for Amharic etc . And concerning Textures, I think it is following a different philosophy .focalizing on speed and voluntarily ignoring innovations like TeX--XeT, .virtual fonts (or is there something new?), etc etc. It shouldn't be taken .as an example, since it is quite unique in his kind. TeX--XeT is not supported because of economic reasons: How much will it cost to produce versus what sort of return is likely. Virtual Font support is forthcoming very soon. Next time you see Barry Smith, ask him about how people keep asking for such a thing for Windows. The Textures environment is "unique" only because no one else has invested the time in duplicating it. And if you look around, you'll see other platforms where a Textures-like environment is being used (AUC-TeX under Unix/GGNU EMACS leaps immediately to mind). Granted that one can simply add the filter command into a command script, but how do you deal with deciding whether a filter is necessary? .| -* some third possibility, and which one? .| Well let's make sure that the NTS people get it right. .The Technical Working Group on MUltiple Language Coordination is working .now and wants to produce results now, not in an indefinite future. If NTS .simplifies the situation, OK, but in the meantime we cannot sit down and .wait I never made that argument. Personally, I'm quite unlikely to be an NTS user any time soon, even if it were released tomorrow. .| -To conclude I would like to insist on one point: either .| -we choose filters or active characters or something else, .| -our approach must be homogeneous for **all** TeX .| -implementations, and absolutely definitely standardized. .| I don't know that I necessarily agree with the requirement of .| homogeneity. I have systems which use filters but for specialized .| purposes, e.g., handling 16-bit input character sets. For more .| prosaic tasks, like handling western European languages, there's .| no need for the filter and its use would only slow things down. .Do you often write in western European languages? Yes. .What do *you* propose .for such "prosaic tasks" as western European languages? do you expect the .average French TeX user to type in things like d\'eg\'en\'er\'e, just .because he happened to be born in France and TeX happened to be written in .the US? I would use active characters mapping the e-acute character to \'e etc. There is not that great of a performance hit in my experience. I've produced thousands of pages of six-language text with no problems using this approach. Yes, a filter was necessary to handle language six (Japanese), but far more time, both development-wise and processor-wise would have been required to handle the fairly straightforward mapping that we are doing now with active characters. -dh From "yannis@gat.citilille.fr (Yannis Haralambous)" Wed Apr 14 11:39:18 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA11047; Wed, 14 Apr 93 11:39:07 MDT Received: from lilserv.citilille.fr by MATH.AMS.ORG (PMDF #2306 ) id <01GX04C7U9WGHV1PK3@MATH.AMS.ORG>; Wed, 14 Apr 1993 13:30:19 EST Received: from gat.citilille.fr by lilserv.citilille.fr Wed, 14 Apr 1993 19:27:12 +0200 Received: by gat.citilille.fr Wed, 14 Apr 93 19:32:00 +0200 Date: 14 Apr 1993 19:32:00 +0200 From: yannis@gat.citilille.fr (Yannis Haralambous) Subject: filters To: tex-implementors@MATH.AMS.ORG Message-Id: <01GX04C821LUHV1PK3@MATH.AMS.ORG> Content-Transfer-Encoding: 7BIT Don Hosek may be right about Hebrew (although MPW _is_ very important, but this is a different issue), but there are still many reasons why filters can be more efficient than active characters. First of all you can build more intelligence into filters: Velthuis already uses a filter for Hindi and Sanskrit. Doing the same job with active characters would result into something like the recently released Telugu system, which is extremely slow and requires more than BigTeX: HugeTeX, GodzillaTeX call it as you like, but you can bet that people out there is South India will have difficulties to run this system on 8086 PC XTs... Of course Hindi users are not the majority of TeX users, but it would be a good thing if there was an open window in _every_ TeX where one could add filtering possibilities. I propose that we standardize a generic filter scheme and include it into all TeX distributions. It will tremendously help non-Americans and it cannot harm the 7-bit guys. The plan of action I propose is the following: -- somebody prepares a well written program (Dominik Wujastyk mentionned the TRANSLIT utility) -- we fix the syntax of the configuration files, and of the preprocessor directives inside TeX files. We test this thoroughly (mainly inside the TWGMLC but also outside). If the results are satisfactory and the 7-bit guys convinced that TeX can be more efficient with filters, then we can start implementing the filters inside TeX (or should I say NTS?). Cheers Yannis From DHOSEK@HMCVAX.CLAREMONT.EDU Thu Apr 15 02:08:28 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA24650; Thu, 15 Apr 93 02:08:22 MDT Received: from HMCVAX.CLAREMONT.EDU by MATH.AMS.ORG (PMDF #2306 ) id <01GX0SDLIGXCHV1LYB@MATH.AMS.ORG>; Thu, 15 Apr 1993 00:58:32 EST Received: from HMCVAX.CLAREMONT.EDU by HMCVAX.CLAREMONT.EDU (PMDF #2326 ) id <01GX0LQQMNDY9KM98D@HMCVAX.CLAREMONT.EDU>; Wed, 14 Apr 1993 21:58:16 PST Date: 14 Apr 1993 21:58:16 -0800 (PST) From: Don Hosek Subject: Re: filters To: yannis@gat.citilille.fr Cc: tex-implementors@MATH.AMS.ORG Message-Id: <01GX0LQQMNE09KM98D@HMCVAX.CLAREMONT.EDU> X-Vms-To: IN%"yannis@gat.citilille.fr" X-Vms-Cc: IN%"tex-implementors@math.ams.org" Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT Yannis, are you proposing a generic filter for all tasks? This could be difficult. It was tough enough writing a generic 16-to-8 filter which didn't do anything more than convert a sixteen bit value into a font/character code pair. -dh From yannis@gat.citilille.fr Thu Apr 15 07:40:59 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA27926; Thu, 15 Apr 93 07:40:55 MDT Received: from lilserv.citilille.fr by MATH.AMS.ORG (PMDF #2306 ) id <01GX19FJI5CWI8RBQQ@MATH.AMS.ORG>; Thu, 15 Apr 1993 09:07:16 EST Received: from gat.citilille.fr by lilserv.citilille.fr Thu, 15 Apr 1993 15:04:22 +0200 Received: by gat.citilille.fr Thu, 15 Apr 93 15:09:11 +0200 Date: 15 Apr 1993 15:09:11 +0200 From: yannis@gat.citilille.fr (Yannis Haralambous) Subject: Re: filters To: DHOSEK@HMCVAX.CLAREMONT.EDU Cc: TWGMLC-L@irlearn.ucd.ie, tex-implementors@MATH.AMS.ORG Message-Id: <01GX19FJOUHEI8RBQQ@MATH.AMS.ORG> Content-Transfer-Encoding: 7BIT | From DHOSEK@HMCVAX.CLAREMONT.EDU Thu Apr 15 07:01:53 1993 | Subject: Re: filters | To: yannis@gat | Cc: tex-implementors@math.ams.org | X-Vms-To: IN%"yannis@gat.citilille.fr" | X-Vms-Cc: IN%"tex-implementors@math.ams.org" | Mime-Version: 1.0 | Content-Transfer-Encoding: 7BIT | | Yannis, are you proposing a generic filter for all tasks? This | could be difficult. It was tough enough writing a generic 16-to-8 | filter which didn't do anything more than convert a sixteen bit | value into a font/character code pair. | | -dh | That's exactly what I propose. We will start with something simple (for example just 8-bit character substitution with strings) and move on to more difficult tasks. The whole thing will be written in a modular way so that updating the code will be very easy (and CWEB is ideal for such things). Every seems difficult before you start it, but this is not a reason to avoid it. We can always decide how generic the filter will be: some problems may be isolated to certain languages, other more general... and finally some problems will be solved by TeX itself. Are you afraid that the task will be too difficult and that the project may crash? I will tell you one thing: being close to the INALCO (and hopefully soon inside it) I am professionally involved in All-languages-typesetting; for the next X years (where X = big number) I will be TeX/Metafont-ing Oriental and non-Oriental languages, and filters will be essential for me. So this task doesn't scares me, I rather see it as part of my (future) job. Of course doing that job doesn't makes me a programmer, so I need you guys to either help me, or show me that there is a better way. Phil? Tom? Timothy? Karl? Barry? Peter? Eberhard? Wayne? what do you think? Yannis From yannis@gat.citilille.fr Thu Apr 15 10:25:47 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA05673; Thu, 15 Apr 93 10:25:43 MDT Received: from lilserv.citilille.fr by MATH.AMS.ORG (PMDF #2306 ) id <01GX1FS1RN80I8RCK2@MATH.AMS.ORG>; Thu, 15 Apr 1993 12:09:32 EST Received: from gat.citilille.fr by lilserv.citilille.fr Thu, 15 Apr 1993 18:06:15 +0200 Received: by gat.citilille.fr Thu, 15 Apr 93 18:11:04 +0200 Date: 15 Apr 1993 18:11:04 +0200 From: yannis@gat.citilille.fr (Yannis Haralambous) Subject: Re: filters To: P.Taylor@Vax.Rhbnc.Ac.Uk Cc: TWGMLC-L@irlearn.ucd.ie, tex-implementors@MATH.AMS.ORG Message-Id: <01GX1FS2GCHUI8RCK2@MATH.AMS.ORG> Content-Transfer-Encoding: 7BIT Actually it won't be necessary to filter *every* input file: a) files generated by TeX (like .aux, .idx) and re-read won't need to be filtered [example: suppose I have a german <"a>, the filter will replace it by the macro \"a. It depends on this macro what will appear in the index file. This is certainly not a problem since MakeIndex3 can identify all possible expressions meaning the same entity, namely <"a>] b) at least at a first stage we can consider it to be the user responsibility to have filtered all \input files. This is not so terrible as it sounds: after all we could write the preprocessor directive in such a way that TeX would complain if it sees it "Caution: file foo needs to be filtered". Filters are already used for Hindi, Tamil, Khmer, Chinese, and other languages. Somebody may say: "these guys have so complicated scripts, they are glad if they can typeset in _any_ way". OK, that's partly true. And I intend to standardize all of these filters into one generic filter. But isn't it a shame if these exotic scripts can take advantage of these techniques, and not so common 8-bit scripts like European languages? Phil, I don't want an absolute solution [since I don't have infinite time]. What we need is a good start (for example a configuration syntax general enough to handle the most possible situations) and an agreement to include the tools in all distributions. If we achieve only half of what we really want it will already be very useful, and the situation will be much better than today (today everybody writes his/her own filter; to make TLPs for Oriental languages you need to compile one or two programs for every language...and if you mix languages you have no guarantee that it will work and that Tamil will not by any chance turn into Chinese... :-)) Yannis From @vm.gmd.de:PEB@DMUMPIWH.BITNET Fri Apr 16 00:07:35 1993 Flags: 000000000001 Return-Path: <@vm.gmd.de:PEB@DMUMPIWH.BITNET> Received: from vs3002.ams.org (VS3002.AMS.COM) by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA24434; Fri, 16 Apr 93 07:07:26 MDT Received: from vm.gmd.de by MATH.AMS.ORG (PMDF #2306 ) id <01GX2NDPJ8EOI8RFGX@MATH.AMS.ORG>; Fri, 16 Apr 1993 08:57:36 EST Received: from DMUMPIWH by vm.gmd.de (IBM VM SMTP V2R2) with BSMTP id 7786; Fri, 16 Apr 93 14:54:32 CET Received: from DMUMPIWH (PEB) by DMUMPIWH (Mailer R2.10 ptf000) with BSMTP id 7314; Fri, 16 Apr 93 11:07:14 GMT Date: 16 Apr 1993 11:00:41 +0000 (GMT) From: Peter Breitenlohner Subject: Re: filters In-Reply-To: Your message of 15 Apr 1993 18:11:04 +0200 To: Yannis Haralambous , Tex-implementors@MATH.AMS.ORG Message-Id: <01GX2NDPPNW2I8RFGX@MATH.AMS.ORG> Organization: Max-Planck-Institut fuer Physik, Muenchen Content-Transfer-Encoding: 7BIT I don't think that external filters can be more than a very superficial solution for ONE language. In a multilingual environment one needs TeX's language switching mechanism and has to switch "filters" accordingly. Thus this might be a true NTS project (although not one of highest priority). What one really would need is a whole additional processing mechanism once TeX has decided it is digesting characters to be typeset, somewhat similar to what happens in math mode when a character with mathcode "8000 is encountered. Peter Breitenlohner From BNB@MATH.AMS.ORG Sun Sep 12 17:06:29 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA25347; Sun, 12 Sep 93 17:06:09 MDT Received: from MATH.AMS.ORG by MATH.AMS.ORG (PMDF #2306 ) id <01H2VCX1QOXSMJLB3A@MATH.AMS.ORG>; Sun, 12 Sep 1993 18:33:14 EST Date: 12 Sep 1993 18:33:05 -0400 (EDT) From: bbeeton Subject: TeX 3.1415 and other updates -- file 2 of 2 To: tex-implementors@MATH.AMS.ORG Message-Id: <747873185.391629.BNB@MATH.AMS.ORG> Content-Transfer-Encoding: 7BIT Mail-System-Version: Date: 11 Sep 93 Message No: 042 To: TeX implementors and distributors From: Barbara Beeton Subject: TeX 3.1415 and other updates -- file 2 of 2 ######################################################################## Commentary from Don Knuth >>> DEK message accompanying shipment [ received 6 Jun 93 ] Barbara, I don't know when (if ever) you plan to put out another supplement to TUGboat containing TeX errata. But I did make some changes to errata.tex that you should know about: New file errata.eight contains the changes subsequent to errata.seven that are in the "final" publication form of Volumes A-E (and the TeXbook and MFbook paperback variants). Henceforth errata.tex contains the changes subsequent to the final versions. The final versions will not be updated in future printings. But I will keep my electronic copies up to date in preparation for future electronic publication. Plain format 3.1415 includes two inportant changes regarding the \b accent in slanted fonts and the \upbracefill \downbracefill macros. Please encourage everybody to install this version ASAP. It is documented in errata.tex; five pages of the TeXbook are slightly affected, but (as I say) the hardcopy versions will no longer be updated. Similarly everybody needs plain.mf version 2.71 (it has two important corrections to the cutdraw macro). don encl: errata.tex errata.eight ************************************************************************ >>> TeXbook / MFbook bugs Date: 26 Jan 1993 18:19:09 +0100 From: Roegel Denis Cc: roegel@pandore.loria.fr Subject: bug in TeXbook Mrs Beaton, I noticed a few weeks ago that you have the privilege to report bugs to the Grand Wizard. Here is a small one that appears in my printed edition of volume A (tenth printing) as well as in the files dated may 1991: page 320, answer to exercise 17.12: there is either a parenthesis too much or one lacking. [ dek: $2.56 ] Denis (roegel@loria.fr) ------- [ the following are in consequence of repagination; a paragraph that was formerly broken between pp.271-272 is now complete on p.271. it is certain that other index items are involved as well. ] [ dek: ] Date: 19 Feb 1993 12:21:42 +0100 From: Roegel Denis Subject: TeXbook bugs (cont'ed) ? Mrs Beeton, Yesterday, when I was reading in the TeXbook the entries related to \mathchardef, I found that there are two slightly wrong entries in the index, viz., On page 471, \mathchardef points to page 272, but I think 271 was meant. The same problem happens for \chardef: 272 instead of 271. [ dek: $2.56 ] Well, that's all! Denis (roegel@loria.fr) ------- Date: Thu, 09 Apr 92 00:16:21 BST From: Chris Thompson To: Barbara Beeton Cc: Robert Hunt Subject: TeXbook (chapter 26) error from Robert Hunt Barbara, Here is a TeXbook bug report from Robert Hunt: > (a) TeXbook error: chapter 26 ("Summary of Math Mode") claims that > \unhbox is an invalid command (and so generates an error) in maths > mode. In fact, it is allowed so long as the box being unboxed is void! > (The \S and \P macros make use of this fact.) This is right, I think. \unhbox and \unhcopy are not mentioned in Chapter 26, explicitly or implicitly, in the current texbook.tex, and so would fall into the "none of the above" on page 293. But they are in fact allowed in math mode provided the box register is void [ dek: $2.56 ] (tex.web section 1110, |unpackage|: this case is actually mentioned as change 232 in tex82.bug, TeX version 0.999). The fact that \leavevmode is allowed in math mode (doing nothing) depends on this. (It is called >From \S and \P, hence Robert's mention of them above.) Chris Thompson ------- Date: 3 Feb 1993 09:58:52 GMT From: schwab@lamothe.informatik.uni-dortmund.de (Andreas Schwab) To: tex-news@SHSU.EDU Subject: Typesetting bugs in The TeXbook and The METAFONTbook There are some typesetting bugs in The TeXbook (March 1992) and The METAFONTbook (February 1992): 1. In the last line of page 358 in The TeXbook there is too much space between `that' and `give'. [ dek: (and it talks about "the proper spacing"!) $2.56 ] 2. In the middle of page 296 in The METAFONTbook there is one comma too much after `tension 4..'. [ dek: $2.56 ] 3. Likewise in The METAFONTbook, on page 299, second text line, the name `Bernshte\u\in' is misspelled. I don't know the correct spelling, but `Bernshtein' occurs three times and `Bernstein' only two times. On the other hand, one of the occurences of the latter form is in the index... [ dek: His name usually transliterated with just ...stein but when I'm transliterating an original Russian mane I aim to be consistently sh for {\cyr sh}. The recent printings have this corrected. ] --- texbook.tex~ Wed Mar 25 20:40:20 1992 +++ texbook.tex Fri Jan 1 20:07:40 1993 @@ -20089,5 +20089,5 @@ After defining characters ^|\ldotp| and ^|\cdotp| that act as math punctuation, it is easy to define ^|\ldots| and ^|\cdots| macros that -\vadjust{\penalty-50} % fairly good breakpoint (on July 27, 1983) +\vadjust{\penalty-50}% fairly good breakpoint (on July 27, 1983) give the proper spacing in most circumstances. Vertical and diagonal dots (^|\vdots| and ^|\ddots|) are also provided here: --- mfbook.tex~ Wed Mar 25 20:17:08 1992 +++ mfbook.tex Fri Jan 1 18:00:58 1993 @@ -15944,5 +15944,5 @@ With slight changes to this code, you can get weird effects. For example, if the definition of |rp| is changed to `|]..tension 4..|', -^^{tension}, and if `|scaled|~|5pt|' is inserted before `|withweight|', +^^{tension} and if `|scaled|~|5pt|' is inserted before `|withweight|', the image will be an ``^{almost digitized}'' character: \displayfig Daa (18.5mm) @@ -16099,5 +16099,5 @@ (1-t)^{n-k}t^{k-1}u_k,$ \enddisplay -a Bernste{\u\i}n polynomial of order $n-1$.) +a Bernshte{\u\i}n polynomial of order $n-1$.) Our problem is to change the meaning of \MF's ^{brackets} so that -- Andreas Schwab schwab@ls5.informatik.uni-dortmund.de ------- [ these may already have been sent, but i can't find them quickly. ] Date: 23 Feb 1993 20:17:58 +0100 (MEZ) From: Joachim Schrod Subject: errors in TeXbook Hi barbara, isn't this the time DEK works on TeX again? Have you forwarded him the following errors/problems, which I mentioned to you a year ago? (All apply to the Oct 89 edition, 9th hardcover printing.) ---------------------------------------------------------------------- On p.368 it is specified: ``After ^^ TeX simply adds or subtracts '100 >From the character immediately following.'' The example is given with ^^j. Aren't lowercase letters in the range a-f and digits forbidden due to the new hex input of chars >"7f ? [ dek: Page 368 is correct (but not complete). Page 370 likewise. Also you can et p with ^^0 if no hex digit follows (but the full rules are on p47) ] ---------------------------------------------------------------------- On p.226 it is mentioned that two whatsit-nodes are realized as extensions to TeX. \language is the third. [ dek: Again, page 226 does not claim "two and only two". Page 455 mentions the other case. (I've changed the index entry for whatsit, so you win $2.56 for that) p481 ] ---------------------------------------------------------------------- Exercise 8.7 is printed twice. [ dek: (Known) ] This should be mentioned against AW, not against DEK. It's obviously a printer's error. [ dek: Well, I didn't communicate successfully enough or check it well enough ] ---------------------------------------------------------------------- Joachim ************************************************************************ >>> The TeX program +++ Comments at the top of tex.web / mf.web Date: Mon, 23 Mar 92 18:04:08 GMT From: Chris Thompson Subject: A small oversight in MF.WEB 2.71 Barbara, Line 23 of mf/mf.web at labrea (i.e. the new official MF 2.71) reads % Version 2.71 fixed bug in draw, allowed unprintable filenames (not yet released). I imagine Don forgot to update it when making 2.7a into 2.71 (they are identical apart from the banner change)! Perhaps someone could draw his attention to this. Chris Thompson JANET: cet1@uk.ac.cam.phx Internet: cet1@phx.cam.ac.uk ------- (reply, 23 Mar 1992) chris, i noticed that too. similarly in tex.web, in that the date given is september '91. ------- ---------------------------------------------------------------------- +++ Changes in kerning in 3.141 Date: Thu, 19 Mar 92 15:55:26 GMT From: Chris Thompson To: Barbara Beeton , Brian {Hamilton Kelly} Subject: Bug (?) report on TeX 3.141 by Wayne Sullivan I have received the following message from Wayne. I am not in a position to do *any* testing for the next few days, but it sounds as though he's saying that the bug in TeX 3.14a hasn't been entirely stopped up in TeX 3.141 (although it did seem to be in 3.14b). Can anyone check? > Accepted: 15:25:12 19 Mar 92 > Submitted: 15:04:28 19 Mar 92 > IPMessageId: -unspecified- > From: "Wayne G. Sullivan" > To: Chris Thompson > Subject: TeX 3.141 > > I got the WEB file for 3.141 and adapted my MS-DOS CHG file: The resulting > EXE's give no problem with the TRIP test, but as a extra check, I ran off > my test version of TEXMAN. The DVI file produced by my 3.141 that of > an '89 version differs at only one point: the index entry for `box memory,'. > The new version has a kern between the `y' and ',' as there should be for > cmr8. However, Knuth has made the comma active for the index so that the > usual inner loop does not insert kerns (there are several instances of > `y,'). The new DVI file only inserts one kern. Is there something in the > new mechanism that could cause the tokens to be rescanned in this single > case so that a kern is inserted? The full entry in the index is > > box memory, 300, 394. > > Of course it could be a bug in my new version, but it is hard to see how > it could cause something like this to happen. > Wayne Sullivan Chris Thompson Cambridge University Computing Service JANET: cet1@uk.ac.cam.phx Internet: cet1@phx.cam.ac.uk ------- Date: Fri, 20 MAR 92 18:35:49 GMT Reply-to: Brian {Hamilton Kelly} From: TEX@rmcs.cranfield.ac.uk Subject: RE: TeX 3.141 In a message to BHK of Fri, 20 Mar 92 13:03:51 GMT, "Wayne G. Sullivan" wrote: > In testing an MS-DOS version of TeX 3.141, I noticed an example where > the DVI file produced by 3.141 differs from that produced by 3.14. The > test file I used is over 1 Mbyte, but I have been able to produce the > same problem in a much smaller file. I thought Knuth always tried to > make upgrades of TeX downward compatible, so 3.14 and 3.141 should > not yield different DVI files in this case. It is possible that the > difference is due to something I have done to my CHG file -- but the > CHG files for 3.14 and 3.141 are nearly the same. Could you check to see > whether your VAX versions of TeX produce different DVI files for > the input file included below? > > %% 3.141 DVI file includes a kern between `y' and `,' in `memory,' > %% but not in `display,' . > %% 3.14 DVI file does not have a kern in either case. > > \let\comma=,% > \let\period=.% > \raggedright \tolerance=5000 \hbadness=5000 \parfillskip 0pt plus 3em > \hsize=17.5pc > \catcode`\,=\active \def,{\tenrm\comma} > \catcode`\.=\active \def.{\tenrm\period\par\hangindent 2em } > \parindent0pt\relax > box display, 66, 75, 79, 158--159, 302, 455. > box memory, 300, 394. > \bye I can confirm this phenomenon: moreover, the additional kern first appears at V3.14a, and is also present in V3.14b. Goodness alone knows why just this one manifestation occurs in such a huge test file. The point is: should DEK fix it? Brian PS My mailer ain't very clever: this was REPLYed to Wayne, and copied to bnb and Chris Thompson ------- Date: Sun, 22 Mar 92 02:23:46 GMT From: CET1@phx.cam.ac.uk To: tex-implementors@MATH.AMS.COM Cc: Wayne Sullivan , Brian {Hamilton Kelly} , Barbara Beeton Subject: A feature(?) of TeX 3.141 discovered by Wayne Sullivan Wayne Sullivan has discovered a situation in which TeX 3.141 gives different character spacing from TeX 3.14. I think it is probably a `feature', but maybe it is a `bug': read the following and judge for yourselves. The change was in fact already present in the alpha test versions 3.14a and 3.14b, but Brian and I failed to discover it. Here is Wayne's original report to me > I got the WEB file for 3.141 and adapted my MS-DOS CHG file: The > resulting EXE's give no problem with the TRIP test, but as a extra > check, I ran off my test version of TEXMAN. The DVI file produced by > my 3.141 that of an '89 version differs at only one point: the index > entry for `box memory,'. The new version has a kern between the `y' > and ',' as there should be for cmr8. However, Knuth has made the comma > active for the index so that the usual inner loop does not insert > kerns (there are several instances of `y,'). The new DVI file only > inserts one kern. Is there something in the new mechanism that could > cause the tokens to be rescanned in this single case so that a kern is > inserted? The full entry in the index is > > box memory, 300, 394. > > Of course it could be a bug in my new version, but it is hard to see > how it could cause something like this to happen. and later he provided the following stripped down test case > Yet a simpler file displaying the problem. With 3.141 one `y,' has no > kern (display,) while the other does (memory,). 3.14 has no kern for > both cases. > > \let\comma=,% > \let\period=.% > \raggedright \tolerance=5000 \hbadness=5000 \parfillskip 0pt plus 3em > \hsize=17.5pc > \catcode`\,=\active \def,{\tenrm\comma} > \catcode`\.=\active \def.{\tenrm\period\par\hangindent 2em } > \parindent0pt\relax > box display, 66, 75, 79, 158--159, 302, 455. > box memory, 300, 394. > \bye The fact that the comma is active is significant only in that it generates a "\tenrm" between the "y" and the ",". This causes TeX (in |main_control|) to think they are in separate words and so the usual implicit kern doesn't get generated. There is no change here in TeX 3.141. In TeX 3.14 and earlier, if automatic hyphenation was later applied to the horizontal list, no change was made here. In TeX 3.141, however, automatic hyphenation re-asseses the relationship between the last letter of the word and subsequent punctuation, and reinserts the implicit kern. (TeX 3.141 has changes in this area to fix bugs associated with right boundary characters, discovered by Brian HK.) The effect can be demonstrated by a simple test: % TeX 3.141 (3.14a,3.14b) test following Wayne Sullivan. \ Display\tenrm,\par \ Display{}.\par \pretolerance=-1 % now force a hyphenation pass \ Display\tenrm,\par \ Display{}.\par \showboxbreadth=255 \showboxdepth=255 \showlists \bye In TeX 3.14 the kerns never reappear, in TeX 3.141 they reappear just in the last two cases. Note: I am relying on Wayne and Brian in saying that the effect happens in TeX 3.141; at the moment I only have 3.14a and 3.14b available. But I don't believe there is any significant change between 3.14b and 3.141. Of course, we are used to the fact that TeX's automatic hyphenation recalculates ligatures and implicit kerns within a word. We know that it is not sufficient to write `shelf{}ful', but that we must must use `shelf\/ful' (say) instead. The change in TeX 3.141 extends this state of affairs slightly. So: `feature' or `bug' ? [ dek: ^^^^^^^ Chris' explanation is lucid and correct, as usual. But nobody has explained why TeX would try hyphenation for `box memory' (the short line) _rather_ than `box display' (the long line)! The reason is that the index is typeset with special parfillskip that tries to avoid short last lines. So `box display' turns out to meet pretolerance but `box memory' doesn't. Even more interesting is the index entry `beauty, 1.' which spectacularly fails to meet pretolerance [badness 2913] yet it does _not_ gain a kern. The reason is that TeX finds no hyphenation points in `beauty' so does not bother reconstructing its kerns. [Please communicate this to Chris and the others. By the way, shelf\-ful is better than shelf\/ful on two counts: (1) it hyphenates; (2) it works in italics.] ] Chris Thompson Cambridge University Computing Service JANET: cet1@uk.ac.cam.phx Internet: cet1@phx.cam.ac.uk ------- Date: Sun, 22 Mar 1992 22:42 GMT +0100 From: Frank Mittelbach To: CET1@PHX.CAM.AC.UK, BNB@MATH.AMS.COM, WSULIVAN%IRLEARN.BITNET@vm.gmd.de, TEX@RMCS.CRANFIELD.AC.UK Subject: Re: bug or feature in 3.141 > Note: I am relying on Wayne and Brian in saying that the effect happens > in TeX 3.141; at the moment I only have 3.14a and 3.14b available. But > I don't believe there is any significant change between 3.14b and 3.141. I checked that the effect doesn't happen with 3.14 as distributed by ArborText so it was most certainly introduced with the last changes. > Of course, we are used to the fact that TeX's automatic hyphenation > recalculates ligatures and implicit kerns within a word. We know that > it is not sufficient to write `shelf{}ful', but that we must must use > `shelf\/ful' (say) instead. The change in TeX 3.141 extends this state > of affairs slightly. So: `feature' or `bug' ? I would vote for feature, not that I like this particular one :-) but the new behavior seems in my eyes more consistent then TeX's behavior before. The whole area of loosing information when reconstructing the horizontal list after hyphenation is something I think is a (mis)feature since it depends on side effects of other areas. When one like to call this a bug then only in the respect that \tenrm interrupts the construction of ligatures or kerns and this fact is not mentioned in the book (so probably $2.56 :-) or is it? [ dek: ^^^^^ it is (page 286) ] Frank ---------------------------------------------------------------------- +++ \language and \setlanguage Date: 16 Jul 1992 15:23:11 -0300 (BST) From: Chris Thompson To: Rainer Schoepf Subject: Re: [\language and \setlanguage -- the story continues] Rainer, I am copying this reply to Barbara, and for her benefit I will include your original message here: > I've just spent some time tracing down a strange behaviour with > multiple hyphenation patterns. Have a look a the following simple > file: > > --- > \language=1 > > \scrollmode > > \showhyphens{zwischen} > > \setbox1=\hbox{B\"ohme Robert,} > \setbox0=\hbox{Der Lykomide : Tradition und Wandel > zwischen Orpheus und Homer :} > > \hsize=10.2cm > \vsize=7,8cm > > \vbox{\unhbox1 \space\unhbox 0} > > \eject > > \bye > --- > > The hyphenation patterns inside the \vbox are that of \language=0. > However, if I put one character at the very beginning of the \vbox, it > uses \language=1. > > The reason is rather simple: the procedure new_graf sets the variable > clang to 0, and it is set to the value of language ony later, when a > character is contributed to the current list. \unhbox does not change > the value clang. Of course, I can get around it using \setlanguage. [ dek: and \everybox ] > > I think this is a bug, since \setlanguage should only be needed when > working with more than one language. I think new_graf should initialize > clang to the current value of \language. What do you think? There is no doubt that the current setup gives favoured treatment to the \language=0 case. However it certainly wouldn't be right to simply modify |new_graf| as you suggest. There are three places which have to be kept consistent: Module 891: The value which |cur_lang| is initialised to. Module 1091: |new_graf| The value which |clang| is initialised to. Module 1200: |resume_after_display| The value which |clang| is initialised to. [ dek: and consistent with TeXbook p455 on which people have been told they can rely. However, I guess the rule makes absolutely no difference in any reasonable application, so i have a chance to change page 455. ] Currently all the initialisations are zero, and therefore consistent. If modules 1091 and 1200 were to use the value of \language, then this value has to be remembered somewhere so that module 891 can use it (clearly the value of \language when module 891 comes to execute is not what is wanted). Note that the values of \lefthyphenmin and \righthyphenmin have to be remembered in the vertical mode |nest| entry *below* the |nest| entry for the paragraph itself, as the latter no longer exists when module 891 executes. A possible line to take would be that whenever unrestricted horizontal mode is started (modules 1091 and 1200), a \setlanguage whatsit should be automatically generated if \language is non-zero. This would make these values more like first-class citizens: one could view the special arrangements for remembering \lefthyphenmin and \righthyphenmin in |nest| as merely an optimisation for the common case when \language is zero. But there are potential problems with this: for example, is the whatsit to be inserted before or after the \everypar tokens are scanned? If before, the \everypar{\setbox0=\lastbox} mechanism will no longer work: if after, what if the \everypar does something like your \unhbox'ing? Whatever Don may want to do about the above, I think the following is definitely a bug: > \language=0 % throughout > \hsize=1in > \tracingparagraphs=\maxdimen > > \lefthyphenmin=1 \righthyphenmin=1 > This is the moment in time for all good men, > \lefthyphenmin=2 \righthyphenmin=3 \setlanguage\language > to come to the assistance of the party. > $$ x\sp n+y\sp n \ne z\sp n $$ > as Pierre Fermat announced to all and sundry, although he > couldn't fit the proof into his margin. > > \bye The text after the displayed equation reverts to being hyphenated with (left,right)hyphenmin=(1,1), even though that immediately before the equation has (2,3). This is because |resume_after_display| in module 1200 doesn't set |lhmin| & |rhmin| in the way that module 1091 does, but instead leaves the values set by the original |new_graf|. I think this is just wrong, even though changing \{left,right}hyphenmin without changing \language is, perhaps, a rather unusual thing to do. [ dek: True; I shall have to fix this in 3.415 $20.48 And then I have to essentially contradict page 455 because I'm resetting clang to 0 after every displayed equation, not only at beginning of paragraph. So the rules stated in TeXbook are faulty. ] Chris Thompson Cambridge University Computing Service JANET: cet1@uk.ac.cam.phx Internet: cet1@phx.cam.ac.uk ------- Date: 16 Jul 1992 17:48:17 +0200 From: schoepf@sc.ZIB-Berlin.DE (Rainer Schoepf) To: Chris Thompson Subject: Re: [\language and \setlanguage -- the story continues] Chris, (A copy of this message goes to Barbara.) > There is no doubt that the current setup gives favoured treatment to > the \language=0 case. However it certainly wouldn't be right to simply > modify |new_graf| as you suggest. There are three places which have to > be kept consistent: > > Module 891: > The value which |cur_lang| is initialised to. > Module 1091: |new_graf| > The value which |clang| is initialised to. > Module 1200: |resume_after_display| > The value which |clang| is initialised to. > > Currently all the initialisations are zero, and therefore consistent. I agree that they are consistent with each other but, in my opinion, not consistent with the setting of language. The conclusion is that you cannot globally set language to a value different from 0, since TeX will sometimes use the hyphenation patterns for language 0. [ dek: The intent was to have language 0 be the user's "global" language [not to have it be English]. But I guess this requires more .fmt files (one for each home language) ] > If modules 1091 and 1200 were to use the value of \language, then this > value has to be remembered somewhere so that module 891 can use it > (clearly the value of \language when module 891 comes to execute > is not what is wanted). Note that the values of \lefthyphenmin and > \righthyphenmin have to be remembered in the vertical mode |nest| entry > *below* the |nest| entry for the paragraph itself, as the latter no > longer exists when module 891 executes. I'd argue that cur_lang should be set to the value of language that was in effect at the beginning of the paragraph. I haven't thought this completely through yet, but wouldn't it be just sufficient to set cur_lang to clang in module 891? When this code is executed, the semantic nest has already been popped, so that clang is the value that was in effect just before the call to new_graf. On the other hand, if there was a change to \language in between, then a setlanguage whatsit will be present, and cur_lang be set appropriately. Rainer Schoepf Konrad-Zuse-Zentrum ,,Ich mag es nicht, wenn fuer Informationstechnik Berlin sich die Dinge so frueh Heilbronner Strasse 10 am Morgen schon so W-1000 Berlin 31 dynamisch entwickeln!'' Federal Republic of Germany or ------- Date: 17 Jul 1992 14:38:53 -0300 (BST) From: Chris Thompson To: Rainer Schoepf Subject: Re: [\language and \setlanguage -- the story continues] Rainer (& Barbara), > I agree that they are consistent with each other but, in my opinion, > not consistent with the setting of language. The conclusion is that > you cannot globally set language to a value different from 0, since [ dek:^^^^^^^^^^^^^^^ you can just say \everyhbox{\setlanguage 1} (Agreed that this is not 100% efficient!) ] > TeX will sometimes use the hyphenation patterns for language 0. I wasn't saying (I think) that they shouldn't be changed, just that they need to be changed consistently. > I'd argue that cur_lang should be set to the value of language that > was in effect at the beginning of the paragraph. I haven't thought > this completely through yet, but wouldn't it be just sufficient to set > cur_lang to clang in module 891? When this code is executed, the > semantic nest has already been popped, so that clang is the value that > was in effect just before the call to new_graf. On the other hand, if > there was a change to \language in between, then a setlanguage whatsit > will be present, and cur_lang be set appropriately. No, this is confused. |clang| is part of the |aux| field in a |nest| entry, and is only defined when the mode is horizontal. The current mode is vertical when module 891 is executing. Notice how |lhmin| and |rhmin| are set *before* the |push_nest| in |new_graf|, while |clang| is set *after*. The |lhmin| and |rhmin| fields exist in every |nest| entry (although only used in a few). It would be perfectly possible to add a new field to the structure to save the initial \language value, in the same way: this would be the cleanest thing to do and I should have mentioned it. But it would mean increasing the size of each |list_state_record|. --- Pause --- Ah ha! There is something one could do to achieve this effect *without* increasing the size of |list_state_record|, and indeed reclaiming the 2 quarterwords |lhmin| and |rhmin| that were added to it in TeX 3.0. The |prev_graf| field exists in all |nest| entries but contains meaningful information only for those with vertical mode. Use a redefinition of this field for the unrestricted horizontal mode entry to hold the *initial* values of \lefthyphenmin, \righthyphenmin, *and* \language in |new_graf| and |resume_after_display|; they would fit easily enough. Then break the values out into local variables in |line_break| *before* the |pop_nest| (module 816), so that they are available to module 891. I rather like this scheme. Chris Thompson Cambridge University Computing Service JANET: cet1@uk.ac.cam.phx Internet: cet1@phx.cam.ac.uk ------- [ dek: OK, it's in. No advantage to the old rule and no reason to assume anybody made use of it in ways that are incompatible with the new one. ] ---------------------------------------------------------------------- +++ Cramped style inconsistencies [ i forwarded this to chris thompson, but received no reply. ] Date: 17 Sep 1992 14:06:57 -0400 (EDT) From: herschor@math.mcgill.ca (Michael Herschorn) To: BNB@MATH.AMS.ORG Subject: Is it a bug? On July 21 I sent the appended lengthy submission to Info-Tex, and it was automatically posted to comp.text.tex on the net. (Because of its length, I do not use the standard quotation indicators.) I have received no comments; maybe that's because it's much ado about not very much. (Since I'm a relative newcomer to TeX, it may also be because I'm totally "off-track".) Nevertheless, there's at least one part of the submission that you are best placed to give an opinion on. It reads: : (I also haven't come across any discussion of a "feature" which turns : cramping off, viz., prefix the material which TeX would normally : cramp by an explicit style reminder. Compare, for example, : $\sqrt{X^2+Y^2}$ with $\sqrt{\textstyle X^2+Y^2}$. However, I doubt : that this is an intended feature since: : i) TeX is normally insensitive to redundant style commands, and from : the user's point of view, this is the way it should be; and, : ii) cramping will be turned off in midstream by an explicit style : command (e.g., $\sqrt{X^2+\textstyle Y^2} has X^2 in cramped style : and Y^2 in uncramped style). : I am completely out of my depth when it comes to understanding the : details of The Program, and please, no flames (not even for the : mixing of metaphors!), but it seems to me that this "feature" : is a result of the cramped_style calculation in section 702 of The : Program being ignored while section 703 updates only size-dependent : quantities. : Although I reserve my rights to priority for the "finder's fee" : mentioned in the Preface to The Program, I would like to hear the : opinions of gurus on the net.) I would greatly appreciate your comments on these paragraphs, and if you care to, on the rest of the posting. Michael Herschorn [ dek: TeX should have had a primitive something like `\cramp' to force a cramped style, but it's too late now. TeX shouldn't preserve crampedness when \textstyle comes along because then there's no way to override it... well I guess one could use \hbox but again it is too late to make changes. ] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% July 21, 1992 Posting %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Newsgroups: comp.text.tex Date: Tue, 21 Jul 92 12:25:00 EDT Organization: Info-Tex<==>Comp.Text.Tex Gateway From: herschor@math.mcgill.ca (Michael Herschorn) Subject: CRAMPED STYLES & solution to:fraction spacing default_rule_thickness. Lines: 374 At the end of this submission you will find a solution to the problem relating to the minimum separation between the numerator or denominator of a fraction and the fraction bar, a question raised and discussed in several postings last month. I would like to begin with a more general problem which provides the tool used for that solution. PART ONE: To measure typeset text from a math list in TeX, the material is placed in an \hbox. One must then specify the style of the text's "free state" inside the box. The horizontal dimension in the free state is affected by "actions at infinity" (glue) and is intrinsically uncertain; the height and depth are determined "quasi-locally", and are fixed once TeX decides on the current style. However, if an item is to be set in a cramped style, absent a TeX command \cramp{}, how does one measure its height and depth? I have also felt a need for \cramp for aesthetic reasons when there is a repetition of an expression close by the original in a line of text, once in an uncramped style, and once in the corresponding cramped style. As well, there is a not insignificant amount of space that can be saved in a document with multiple occurrences of, e.g., ${\x}^{{\x}^{{\x}^{\cdot^{\cdot^{\cdot^{\x}}}}}}$, if this could be set in a cramped style. [ dek: For such a document I would fiddle with parameter \sigma_14 ] I have most of the standard TeX references, but I haven't come across any mention of the possibility of obtaining a cramped style "on demand". Thus there may be some general interest in the preliminary version of my macro, and I append it below. (I also haven't come across any discussion of a "feature" which turns cramping off, viz., prefix the material which TeX would normally cramp by an explicit style reminder. Compare, for example, $\sqrt{X^2+Y^2}$ with $\sqrt{\textstyle X^2+Y^2}$. However, I doubt that this is an intended feature since: [ dek: It is "intended" in the sense that it is rule 3 on page 442 ] i) TeX is normally insensitive to redundant style commands, and from the user's point of view, this is the way it should be; and, ii) cramping will be turned off in midstream by an explicit style command (e.g., $\sqrt{X^2+\textstyle Y^2} has X^2 in cramped style and Y^2 in uncramped style). I am completely out of my depth when it comes to understanding the details of The Program, and please, no flames (not even for the mixing of metaphors!), but it seems to me that this "feature" is a result of the cramped_style calculation in section 702 of The Program being ignored while section 703 updates only size-dependent quantities. Although I reserve my rights to priority for the "finder's fee" mentioned in the Preface to The Program, I would like to hear the opinions of gurus on the net.) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % cramped.sty Preliminary version July 21,1992 % % Enables the typesetting of material in the cramped styles % D', T', S' and SS'. % % \cramp{} will set in the cramped version C' of % the current style C. % % \Cramp{\...style}{} (where you specify the current style) % has been left accessible. % % % Author: Michael Herschorn % Departmentof Mathematics and Statistics % McGill University % 805 Sherbrooke Street West Phone: 514-398-3825 % Montreal QC CANADA H3A 2K6 FAX: 514-398-3899 % email: herschor@gauss.math.mcgill.ca % % Please email me your comments and suggestions as well as informing % me directly of any bugs you may find. % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \catcode`@=11 \def\cramp{\mathpalette\Cramp}% \def\Cramp#1#2{\setbox0=\hbox{$\m@th#1\cr@mp{#2}$} % [ dek: As an alternative, you could reset \nulldelimiterspace here % ] \Ch@p#1 \dimen2=\the\ht0 \advance\dimen2 -\dimen0 \ht0=\the\dimen2 \box0} \def\cr@mp{\kern-\the\nulldelimiterspace\radical"380380}% % [ dek: ^^^^^^^ % nonexistent characters; better to say \radical 0 % ] \def\Ch@p#1{\ifx#1\displaystyle \dimen0=\the\fontdimen5\textfont2 \advance\dimen0 -.75\dimen0 % [ dek: why not say \dimen0=.25\fontdimen5\textfont2 % ] \advance\dimen0\the\fontdimen8\textfont3 \else %% \ifx#1\textstyle \dimen0=\the\fontdimen8\textfont3 \advance\dimen0 .25\dimen0 \fi}%%%%%%%%% If you have "variations" in family 3, %%%%%% comment out the preceding line and "uncomment" %%%%%% the 7 lines beginning with "%%". %% \else %% \ifx#1\scriptstyle\dimen0=\the\fontdimen8\scriptfont3 %% \advance\dimen0 .25\dimen0 %% \else \dimen0=\the\fontdimen8\scriptscriptfont3 %% \advance\dimen0 .25\dimen0 %% \fi\fi\fi} \catcode`@=12 \endinput %% % end of file cramped.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [ dek: The same idea but using TeX more fluently: \def\Cramp#1#2{\setbox0=\hbox{\nulldelimiterspace=\z@ @\m@th#1\radical0{#2}$}% \ifx#1\displaystyle \dimen0=\fontdimen8\textfont3 \advance\dimen0 .25\fontdimen5\textfont2 \else \dimen0=1.25\fontdimen8 \ifx#1\textstyle\textfont \else\ifx#1\scriptstyle\scriptfont\else\scriptscriptfont \fi\fi 3 \fi \advance\dimen0-\ht0 \ht0=-\dimen0 \box0 \relax} (He uses \the' unnecessarily and doesn't factor \if...\fi) This works. (worth publishing in TUGboat) ---- Note that \cramp{x^{\cramp{y^2}}} causes TeX to typeset y^2 16 times! The same is true whenever a \mathpalette is inside a \mathpalette ] PART TWO: Michael Downes (22 Jun 1992, Info-TeX@shsu.edu) wrote: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Dan Luecking wrote (19 Jun 1992, Info-TeX@shsu.edu): + +> Michael Barr posted a query a while back about the separation +> between the numerator/denominator of a fraction and the fraction bar. +> +> I have not seen a response, so having tried to understand the +> TeXbook on this point and made some headway in doing so I thought +> I might discuss the problem. + +> ... I have run into it several times and would like to know if +> anyone has defined a fraction making command to deal with it. One +> way is to insert a 0 width rule extending below the numerator and +> above the denominator, but I do not see a good way to make this +> automatic. A way I have considered, but rejected, is to increase the [ dek: clever thought ] +> relevant parameter, (something like \fontdimen8\textfont3=1pt +> instead of 0.4pt) and then define all \frac's using \above (in which +> the thickness of the rule is explicitly given). The problem is that +> default_rule_thickness is used in several internal calculations [ dek: \overline is screwed up but could be handled as special kind of \radical (with new font)! ] +> including the positioning of sub/superscripts. [ dek: rule 18e, not too bad if increased ] +> +> Does anybody have anything to say about this? + + I have observed the same problem in Amer. Math. Soc. publications, + although the examples I've happened to notice involved letters with + descenders such as p and q, rather than vertical bars. Your analysis + of the problem corresponds closely to what I found in some cursory + investigations. + + The problem seems to be slightly worse than you suggest---or maybe you + just didn't bother to amplify on results of your experiments: The most + significant drawback of the rejected solution of setting \fontdimen 8 + \textfont 3 to a larger value and using \above instead of \over is + not the internal calculations you mention but the fact that the fraction + bar thickness and the space around it are always dependent, even in + \above, so that if we say $1\above.4pt 2$ the space around the + fraction bar is calculated from the .4pt, not from \fontdimen 8 of + \textfont 3, and we're back where we started from. [ dek: Oh, right! ] + +> ... Is it worthwhile suggesting +> that a major macro package try do something about it? Have any done +> anything? + + If my understanding of the problem is correct, it's impossible for a + macro package to provide any reasonable solution. The only reasonable + solution is to change TeX, the program. (And my definition of + `reasonable' is pretty extreme when it comes to macro writing; I have + done or contemplated doing things at the macro level that any + `reasonable' programmer would consider unreasonable.) + +> Is there any real problem at higher resolutions (i.e., does +> everything look OK printed at 1000dpi)? + + In my opinion, there is not enough space around the fraction bar in + the problematic combinations (textstyle fractions, vertical bars, + letters with descenders), even at high resolution. I'd rather have + some control to adjust the space slightly. [ dek: For these you are probably best off tuning the \sigma's... although it's probably OK to teach keyboarders what I actually do [see next comment] ] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The Grand Wizard made his design choices a.e. optimally, and I would stick with his implementation of 15d in Appendix G of The TeXbook. Apparent differences between the letter-base levels in the numerators and in the denominators of fractions in the same line spoil the appearance of the line; shifting the numerator up or the denominator down in a fraction with adequate clearance so as to match the letter- base levels of another fraction in the line introduces ugly white [ dek: I am occasionally unhappy with fractions, much more often unhappy with \root's, and guilty of overlooking several fontdimens in false belief that I was getting more unity/elegance. So I occasionally use ^{\mathstrut} in denominators (or superscripts therein), often in \root's, _{\mathstrut} in numerators (or subscripts therein). ] space. The more I understand the problem, the better I like the GW's balancing act. Nevertheless, as pointed out by Dan Luecking, Berthold K.P. Horn and Michael Downes, it would have been nice to have a free parameter to adjust in special circumstances. ("Just so you shouldn't need to use it", as the Yiddish expression puts it.) Once we have , it becomes a simple hack to solve this problem (and other similar ones). I wrote (and attach a copy of) as an illustration. (The coding is not elegant, but it works.) It should be used only when absolutely necessary, and even then, it should be used sparingly. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % spreadfraction.sty Preliminary version July 21,1992 % % If used in a non-cramped context, \xfrac{#1}{#2}{#3} produces % {#1\over #2} exactly as TeX would, except that the minimum clearance % that will be tolerated between the numerator or denominator of this % fraction and the bar line is #3 times the default rule thickness. % (See Rule 15d in Appendix G of The TeXbook. TeX hardwires in % #3=3 in \displaystyle and #3=1 in the other styles; spreadfraction.sty % allows the use of arbitrary values. In other words, .phi. is replaced % by #3 times the default rule thickness, everything else is kept % constant.) % % In a cramped context, i.e., if the entire fraction is a Rad atom % (under a root sign), an Over atom (from \overline), in the denominator % of another fraction, is a subscript, or is a superscript to an % entity in cramped style, \xfracc{#1}{#2}{#3} should be used instead % of \xfrac{#1}{#2}{#3}. (I may automate the selection of \xfracc in a % future version; since spreadfraction.sty is intended for touch-up use, % I don't consider automation a priority (and it may be like putting a % tiara on a baglady!)). % % \Xfrac{\...style}{}{}{} (identical to \xfrac{}{}{}, except % that you specify the style) and \Xfracc{\...style}{}{}{} (DITTO), % have been left accessible to the user. % % To obtain a version of spreadfraction in which the minimum clearances % are #3 times the hardwired ones, declare \DEKtrue after inputting % spreadfraction.sty % % % Author: Michael Herschorn % Departmentof Mathematics and Statistics % McGill University % 805 Sherbrooke Street West Phone: 514-398-3825 % Montreal QC CANADA H3A 2K6 FAX: 514-398-3899 % email: herschor@gauss.math.mcgill.ca % % Please email me your comments and suggestions as well as informing % me directly of any bugs you may find. % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newif\ifDEK \input cramped.sty \catcode`@=11 \def\xfrac#1#2#3{\M@thpalette\Xfrac{#1}{#2}{#3}} \def\M@thpalette#1#2#3#4{% \mathchoice{#1\displaystyle{#2}{#3}{#4}}% {#1\textstyle{#2}{#3}{#4}}% {#1\scriptstyle{#2}{#3}{#4}}% {#1\scriptscriptstyle{#2}{#3}{#4}}} \def\Xfrac#1#2#3#4{\ifx#1\displaystyle \def\C@rr@ntF@nt{\textfont} \let\@djSt@le=\textstyle \L@rgeS@ze#1{#2}{#3}{#4} \else \ifx#1\textstyle \def\C@rr@ntF@nt{\textfont} \let\@djSt@le=\scriptstyle \N@rmalS@ze#1{#2}{#3}{#4} \else \ifx#1\scriptstyle \def\C@rr@ntF@nt{\scriptfont} \let\@djSt@le=\scriptscriptstyle \N@rmalS@ze#1{#2}{#3}{#4} \else \def\C@rr@ntF@nt{\scriptscriptfont} \let\@djSt@le=\scriptscriptstyle \N@rmalS@ze#1{#2}{#3}{#4} \fi \fi \fi} \def\L@rgeS@ze#1#2#3#4{\dimen1=\the\fontdimen8\textfont2 \dimen2=\the\fontdimen11\textfont2 \N@mer@tor#1{#2}{#3}{#4}} \def\N@rmalS@ze#1#2#3#4{% \dimen1=\the\fontdimen9\C@rr@ntF@nt2 \dimen2=\the\fontdimen12\C@rr@ntF@nt2 \N@mer@tor#1{#2}{#3}{#4}} \def\N@mer@tor#1#2#3#4{% \dimen3=\the\fontdimen22\C@rr@ntF@nt2 \dimen4=\the\fontdimen8\C@rr@ntF@nt3 \dimen5=#4\dimen4 \ifDEK\ifx#1\displaystyle\advance\dimen5 2\dimen5 \else \fi \else \fi \advance\dimen4 -.5\dimen4 \setbox1=\hbox{$\m@th\@djSt@le{#2}$} \dimen0=\dimen1 \advance\dimen0 -\the\dp1 \advance\dimen0 -\dimen3 \advance\dimen0 -\dimen4 \ifdim\dimen5>\dimen0 \advance\dimen1 \dimen5 \advance\dimen1 -\dimen0 \D@nomin@tor#1{#3} \else \D@nomin@tor#1{#3} \fi} \def\D@nomin@tor#1#2{% \setbox2=\hbox{$\m@th \@djSt@le\Cramp\@djSt@le{#2}$} \dimen0=\dimen2 \advance\dimen0 \dimen3 \advance\dimen0 -\the\ht2 \advance\dimen0 -\dimen4 \ifdim\dimen5>\dimen0 \advance\dimen2 \dimen5 \advance\dimen2 -\dimen0 \Qu@ti@nt#1 \else \Qu@ti@nt#1 \fi} \def\Qu@ti@nt#1{% \ifdim\wd1<\wd2 \dimen9=\the\wd2 \setbox3=\hbox to \the\dimen9{% $\m@th\hfil\box1\hfil$} \setbox1=\box3 \dimen8=\dimen9 \else \dimen9=\the\wd1 \setbox3=\hbox to \the\dimen9{% $\m@th\hfil\box2\hfil$} \setbox2=\box3 \fi \advance\dimen1 -\the\dp1 \advance\dimen1 -\dimen3 \advance\dimen1 -\dimen4 \dimen6=\dimen2 \advance\dimen6 -\the\ht2 \advance\dimen6 \dimen3 \advance\dimen6 -\dimen4 \kern\the\nulldelimiterspace \raise-\the\dimen2 \hbox to\the\dimen9{% \vbox{\box1\kern\the\dimen1\hrule \kern\the\dimen6\box2}} \kern\the\nulldelimiterspace} \def\Xfracc#1#2#3#4{\ifx#1\displaystyle \let\@djSt@l@=\textstyle \G@toResult{#1}{#2}{#3}{#4} \else \ifx#1\textstyle \let\@djSt@l@=\scriptstyle \G@toResult{#1}{#2}{#3}{#4} \else \let\@djSt@l@=\scriptscriptstyle \G@toResult{#1}{#2}{#3}{#4} \fi \fi} \def\G@toResult#1#2#3#4{% \Xfrac#1{\Cramp\@djSt@l@{#2}}{#3}{#4}} \def\xfracc#1#2#3{\mathchoice {\Xfrac\displaystyle{\Cramp\textstyle{#1}}{#2}{#3}}% {\Xfrac\textstyle{\Cramp\scriptstyle{#1}}{#2}{#3}}% {\Xfrac\scriptstyle{\Cramp% \scriptscriptstyle{#1}}{#2}{#3}}% {\Xfrac\scriptscriptstyle{\Cramp% \scriptscriptstyle{#1}}{#2}{#3}}} \catcode`@=12 \endinput %% %% end spreadfraction.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I would appreciate comments and feedback by email and shall summarize and post. Michael Herschorn *********************************************************************** Michael Herschorn email:herschor@gauss.math.mcgill.ca Department of Mathematics and Statistics fax: 514-398-3899 McGill University phone: 514-398-3825 805 Sherbrooke Street West Montreal QC CANADA H3A 2K6 *********************************************************************** %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% End of July 21, 1992 Posting %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ------- Date: 29 Jan 1993 02:29:26 -0500 (EST) From: herschor@math.mcgill.ca (Michael Herschorn) My understanding is that February is the month in which you present DEK with a list of possible bugs for his consideration. Since February is almost upon us, I would like to draw your attention to our previous e-mail exchanges [ ... ] Perhaps the simplest thing would be to typeset $${1\over x^2}{1\over\textstyle x^2}$$ $${1\over X^2}{1\over\textstyle X^2}$$ and look closely at the positioning of the exponents in the denominators (and the denominators themselves). TIA Michael Herschorn ************************************************************************ >>> plain.tex (includes one possible TeX bug) Date: Sun, 10 May 92 15:33:59 EDT From: "Walter D. Neumann" Subject: plain.tex bugs Dear Barbara, In creating a style file for a proceedings volume, Larry Siebenmann and I had collected various plain.tex bugs and written them at various times to the net, assuming they would find their way to Knuth and be corrected eventually. Checking the most recent plain.tex I see some have (missing m@th in some macros) but others havn't. Larry suggested that you are a good clearing house for this sort of thing, so I am sending our residue to you. The bugs are in Plain's handling of inserts. One bug is actually a TeX bug, and I havn't checked if most recent TeX fixes it, since we don't have the most recent installed yet. That bug is that \lastskip gets lost by an \insert. For details [ dek: ^^^ not really a bug in \TeX ] of this, and also the plain.tex problems, see the following file that I posted to the net about a year ago. In my opinion, items 2 (second part), 3, and 5 of the list of "problems" deserve the name "bugs" while 2 (first part), 1, and 4 are merely poor choices. It also seems to me that it is not logical that TeX uses \topskip instead of \baselineskip at top-of-page if there is a top insertion ("remaining problem" quoted below). Bug or poor choice? -- take your pick. %% newinsert.tex 3/17/91, 4/2/91 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % walter neumann (neumann@mps.ohio-state.edu) % % Include with "\input newinsert.tex" to fix following problems % with plain TeX's handling of \midinsert and \topinsert: % % 1. An insert that falls at the top of the page is too high: it's % top is at top-of-page rather than top-of-ink. % 2. Plain uses \bigskip for space around inserts and assumes \bigskip % is 12pt plus stretch, so \midinsert misbehaves if \bigskipamount % is changed. This space should be an independent quantity. % 3. Consecutive midinserts that did not float are spaced twice % as far apart as consecutive topinserts or floated midinserts. % 4. Midinserts can get out of order (see Exercise 15.5 of TeXbook). % 5. \removelastskip fails after a floated insert. This is relevant for % an insertion before any construction (such as a proclamation in % plain TeX) that does an explicit or implicit \removelastskip. % % Remaining problem: TeX uses \topskip instead of \baselineskip for the % first line of a page after any topinserts. With the default values % of 10pt and 12pt respectively, this gives 2pt less space between a % topinsert or floated midinsert and following text than between a % middle insertion and following text. To avoid this use: % % \topskip=\baselineskip % [ dek: the \skip parameter for \insert handles such % discrepancies; see pp 122-123 especially Step 1 on page 123 % ] % % PARAMETERS: % Plain.tex puts \bigskipamount of space before and after inserts. % We provide \insertskipamount for this purpose (default \medskipamount). % In addition, \inserthardskipamount of glue is added at the top of EVERY % insert; it remains even at top of page (default 6pt; it should be at % least \topskipamount-(text height)). % These defaults give good balance for figure insertions of the form: % \midinsert % [Commands to include a graphics file] % \medskip \centerline{Figure Title} % \endinsert. % \chardef\newinsCatAt\the\catcode `\@ \catcode `\@=11 % %%%%%%%%%%%% Corrected insert macros for plain.tex %%%%%%%%%%%%%%%%% % % New skipamounts: % \newskip\insertskipamount\newskip\inserthardskipamount \insertskipamount\medskipamount % Change as desired. \inserthardskipamount 6pt % Change as desired (see above) \def\insertskip{\vskip\insertskipamount} % % Save and restore \lastskip: % \newskip\LastSkip \def\SaveLastSkip{\LastSkip\lastskip} \def\RestoreLastSkip{\nobreak\vskip-\LastSkip\vskip\LastSkip} % % Larry Siebenmann's test for split topinserts: % \newcount\SplitTest% will be set to -1 if a topinsert has split \def\SetSplitTest{\SplitTest\insertpenalties \SaveLastSkip\insert\topins{\floatingpenalty1}\RestoreLastSkip \advance\SplitTest-\insertpenalties} % % From here on we modify definitions in plain.tex. % % Redefine \midinsert to convert to \topinsert if a topinsert has been % split, to prevent midinserts getting out of order (cf. TeXbook Exercise % 15.5). As in plain.tex, a \midinsert still converts to a \topinsert % (which then splits) if the insert is too big for current page. % Was: \def\midinsert{\@midtrue\@ins} \def\midinsert{\par\SetSplitTest\ifnum\SplitTest=-1 % [ dek: would <0 also work? % ] \@midfalse\else\@midtrue\fi\@ins} % Redefine \@ins to add \inserthardskipamount of glue above. % Was: \def\@ins{\par\begingroup\setbox\z@\vbox\bgroup} \def\@ins{\par\begingroup\setbox\z@\vbox\bgroup% \vglue\inserthardskipamount} % Changes to \endinsert of plain.tex 3.0: % - Use \insertskipamount instead of \bigskipamount throughout. % - Use larger of previous skip and insertskip before middle insert. % - Add \nointerlineskip to avoid unwanted extra 1pt skip. % - Save and restore lastskip when an insert floats. \def\endinsert{\egroup % finish the \vbox \if@mid \dimen@\ht\z@ \advance\dimen@\dp\z@ \advance\dimen@\insertskipamount% was 12pt (wn) \advance\dimen@\pagetotal\advance\dimen@-\pageshrink \ifdim\dimen@>\pagegoal\@midfalse\p@gefalse\fi\fi % Next 3 lines replace: \if@mid \bigskip\box\z@\bigbreak (wn) \if@mid% \ifdim\lastskip<\insertskipamount\removelastskip\insertskip\fi \nointerlineskip\box\z@\penalty-200\insertskip \else% \SaveLastSkip% added (wn) \insert\topins{\penalty100 % floating insertion \splittopskip\z@skip \splitmaxdepth\maxdimen \floatingpenalty\z@ \ifp@ge \dimen@\dp\z@ \vbox to\vsize{\unvbox\z@\kern-\dimen@}% depth is zero \else \box\z@\nobreak\insertskip\fi}% was \bigskip\fi (wn) \RestoreLastSkip% added (wn) \fi\endgroup} %%%%%%%%%%%%%%%%%% Done correcting insert macros %%%%%%%%%%%%%%%%%%% % \catcode `\@=\newinsCatAt \endinput %% end newinsert.tex -- Walter Neumann Email: neumann@mps.ohio-state.edu Department of Mathematics neumann@ohstpy.bitnet Ohio State University Tel: 614-292-4886 (office) Columbus, OH 43210 -292-4975(Math. Dept.) -292-1479 (Dept. Fax) ------- [ dek: These macros look very good but I cannot change plain TeX any more at this late date. _Ever_._ (Wish I had thought of them in 1985!) He should publish them in TUGboat. ] ************************************************************************ Date: 24 Feb 1993 17:35:03 -0500 (EST) From: bbeeton Subject: message for don -- trip, volume b glitch [ don -- i don't know why i failed to send this one out with the rest; it's not as if it would have taken a long time to edit out extraneous stuff. ] >>> Volume B; trip Date: Fri, 10 Apr 92 13:21:27 GMT From: Peter Breitenlohner Subject: message to DEK barbara, can you please forward the following to Knuth. Thanks 1. deficiency in TRIP test. while doing some optimization for PubliC TeX I had introduced a bug in the splittopskip computation in prune_page_top In mod.969 the line ....... width(temp_ptr):=width(temp_ptr)-height.... was changed by mistake to something equivalent to ....... width(temp_ptr):=width(temp_ptr)+height.... [ dek: It would be interesting to check the archives to see why we failed to cover this -- but I haven't time to do so (nor to update trip). ] When this bug was finally found by Ulrik Vieth we both were much surprised that this error was never detected by the TRIP test! 2. missing mini-index entry On page 483 of Vol.B there ought to be an entry for off_save. In my old book (TeX Version 2.0) there is none. Unfortunately I had no possibility to check one of the newer editions. [ dek: the newer books have improved indexing software, so this should no longer be an issue. In 1994, get a new Vol B! It will be the permanent, good one. ] Sincerely Peter Breitenlohner ************************************************************************ >>> Report on TeX 3.14b Date: Wed, 5 FEB 92 21:57:11 GMT Reply-to: Brian {Hamilton Kelly} From: TEX@rmcs.cranfield.ac.uk To: BNB <@nsfnet-relay.ac.uk:BNB@MATH.AMS.com> Subject: RE: TeX 3.14b, etc barbara, In message of Wed, 05 Feb 92 17:32:30 GMT, Chris Thompson wrote: > Some rather hasty and incomplete testing done. I have compiled > TeX 3.14b and confirmed that it fixes the doubled kern problem > in 3.14a, and also Robert Hunt's \showbox bug. Test documents > generate unaltered DVI files. I can also confirm that it DOES fix my original problem with terminal- \sigma ligatures with punctuation. I've also run TRIP and match DEK's output (apart from the fact that he's obviously gone the whole hog and called his executable 3.141, because that's how his logs read, rather than 3.14b. > MF 2.7a compiled and run through a few tests. Proof mode cmr10 > shows a diff on character "Q" only: this is presumably the result > of the "fixed bug in draw" (as there is no new mf84.bug in /alpha, > I don't know what this bug might be). Actually the pixel deltas > seem to change the "Q" bitmap back to what it was in some earlier > version of MF (or maybe this is an accident due to some nearly half > integral coordinate that flips one way of the other on lots of > changes). I haven't looked at MF at all yet, mainly because I didn't know what it was supposed to be fixing! > Weave 4.4 compiled and tested to the extent of that it generates > identical output to 4.2 for a few WEB files. And I can also confirm that it correctly handles wrapped TeX comments; great! > I note the existence of a number of changed .mf files for cm fonts > in /alpha, but as there is no cm85.bug either, I wouldn't know what > to look for. Ditto. Best regards, Brian ------- Date: Thu, 06 Feb 92 13:59:36 GMT From: Chris Thompson To: Brian {Hamilton Kelly} , Barbara Beeton Subject: RE: TeX 3.14b, etc I have also run the new trip and trap tests (snap!) and they pass (as Brian points out, in the tr(i|a)p test output the banners appear as "3.141" and "2.71" rather than "3.14b" and "2.7a"). MF 2.7a passes the 2.7 trap test; TeX 3.14b doesn't quite pass the 3.14 trip test, but that is no suprise. Chris Thompson Cambridge University Computing Service JANET: cet1@uk.ac.cam.phx Internet: cet1@phx.cam.ac.uk ************************************************************************ >>> tangle.web 4.2 Date: Mon, 24 Feb 92 10:42:31 GMT From: Peter Breitenlohner To: Barbara Beeton Subject: tangle.web 4.2 barbara, I retrieved tangle.web 4.2 from labrea. To my surprise I found that the 'extra "}" bug' I reported some time ago ist still there, although it was fixed in weave. Maybe you can clarify this. peter %-------------------------------------- Line numbers refer to TANGLE.WEB 4.2 as of March 26, 1991. @x [13] m.145 l.2664 get_next - bug fix othercases if c>=128 then goto restart {ignore nonstandard characters} @y "}": begin err_print('! Extra }'); goto restart; @.Extra \}@> end; othercases if c>=128 then goto restart {ignore nonstandard characters} @z %--------------------------------------- ------- Date: Mon, 24 Feb 92 15:45:56 GMT From: Peter Breitenlohner To: Barbara Beeton Subject: tangle.web 4.2 barbara, I forgot to mention another longstanding bug? in tangle: % TANGLE.WEB 4.2 as of March 26, 1991. @x [4] m.31 l.642 - activate debug_help @!debug debug_help;@+gubed @y @!debug debug_skipped:=debug_cycle;debug_help;@+gubed @z %--------------------------------------- [ dek: I don't know why version 4.2 was still on labrea; version 4.3 was released September 1991 and fixed the bug in question ... Version 4.4 will fix this other (debug cycle) one. ] cheers peter ------- Date: Mon, 24 Feb 1992 10:10:36 -0500 (EST) From: Barbara Beeton To: PEB%DM0MPI11.bitnet@CUNYVM.CUNY.EDU Subject: Re: tangle.web 4.2 peter, i've just checked at labrea. there's no new version of tangle in /alpha so it seems that either (1) knuth thought that there were no changes, or (2) he forgot to install it, or (3) the notes he accidentally sent from sweden by sea mail contained some more things to look at and he decided to wait. i'll follow it up. thanks. i still haven't finished transcribing knuth's last set of comments, that i received before going to england for the uktexug and tug board meetings. i may find something there. maybe today ... -- bb ------- Date: Mon, 24 Feb 92 16:12:49 GMT From: Peter Breitenlohner To: Barbara Beeton Subject: Re: tangle.web 4.2 OK thanks, the point is that the 'extra "}" bug' is just a minor nuisence in weave but can lead to a rather mysterious nonsense in tangle's output. pb ************************************************************************ >>> Reply from Don Date: 27 Feb 1993 23:48:06 -0800 Subject: note from Don Many thanks, Barbara, for the notes you sent. As usual, Phyllis made hardcopy for me, and I scribbled comments on that, and wrote appropriate checks when monetary rewards were due. The result will be wending its way to you via snail mail. TeX version 3.1415 is done and should be available soon by anonymous ftp >From the semi-secret "alpha" [not pub] directory at labrea. A system guru will probably install it sometime this weekend; I don't have permission to do that. Look for file ~ftp/alpha/tex3.1415.tar.Z at labrea.stanford.edu. Uncompressing and untarring will yield only the crucial files that have changed: tex.web, tripin.log, trip.log, trip.typ; also new versions of errata.tex and tex82.bug. I think it's wise to wait awhile before releasing it officially --- I will be updating METAFONT, some day, if that Sun file name stuff ever is acted on --- although people are welcome to try it out. Just a few changes: one which makes it more efficient to have everything in a nonzero \language, another which affects kerns inserted at the boundary characters using the smart-ligature mechanism. (Previously such kerns were not treated consistently or correctly, so people must not have been using them. Now they act like kerns on accents, i.e., they do not disappear into line breaks.) I plan to look at TeX again about 15 months from now. Thanks again for your most helpful accumulation of pretty-much-noise-free comments. ************************************************************************ >>> Metafont/MFBook Date: 21 Dec 1992 01:03:42 +0000 (GMT) From: Chris Thompson To: Barbara Beeton Cc: Robert Hunt Subject: plain.mf bug from REH, etc. Dear Barbara, I should have known that Robert Hunt had been quiet for too long... He has sent me the follo wing: > I have found a bug in Plain METAFONT; line 371 of the format file (in the > definition of cutoff) should read > (cut_ scaled (1+max(-pen_lft,pen_rt,pen_top,-pen_bot)) > instead of > (cut_ scaled (1+max(pen_lft,pen_rt,pen_top,pen_bot)) > > The METAFONTbook would also need correcting on pages 151 and 272. [ dek -- $ 2.56 ] I think he is right that the current code is wrong, but his fix is insufficiently drastic. The absolute values of all four pen_? quantities needs to be taken, as they can be of any sign (although the ones that Robert is assuming are no doubt the most likely). One for Don's list. Chris Thompson ------- Date: 21 Dec 1992 21:25:37 +0000 (GMT) From: Chris Thompson Subject: More on Robert's plain.mf bug Dear Barbara, ... Robert Hunt has commented on my remarks: > Interestingly enough, my suggested alteration > (cut_ scaled (1+max(-pen_lft,pen_rt,pen_top,-pen_bot)) > _is_ sufficient, and there is no need for > (cut_ scaled (1+max(abs pen_lft,abs pen_rt,abs pen_top,abs pen_bot)). > This is because (as far as I am aware) the two inequalities pen_lft \le pen_rt > and pen_bot \le pen_top hold. You'll soon see why my solution is good enough > if you try coming up with an example where it fails! and he is quite right---his fix is sufficient. Chris Thompson [ dek -- there is another bug in cutdraw too, re the spurts of ink discussed on page 112. Both of these bugs are corrected in base_version 2.71 ] <<< end items send 23 Dec 1982 ************************************************************************ >>> items sent 8 Mar 1993 Date: Mon, 13 Apr 92 12:26:16 GMT From: Peter Breitenlohner To: Barbara Beeton Subject: message for Knuth and a question barbara, Right know I am working on a modified TeX-XeT change file, inspired by that by Knuth and MacKay published in TUGboat but different in two essential points: 1. the text direction primitives are treated differently in order not to disturbe TeX's linebreaking algorithms for pure left-to-right text (that is to say the new TeX-XeT passes the TRIP test in a much better way than the old one) 2. right-to-left text is reversed explicitely and writen to a normal DVI (not DVI-IVD) file. All that is still in progress, but will be finished soon. Can you propose a good way to make the result widely available and known? In doing all that I stumbled on some dubious code in tex.web. Can you please forward the following (or the whole message) to Knuth. Thanks Peter %-------------------------------------------------------- Misleading code (or a real bug?) in tex.web V 3.141 In the hlist/vlist_out routines leader boxes are shifted by their shift_amount. As far as I can see this shift_amount is always zero and that code should be removed. [dek -- ^^^^ yes, since 28 Mar 1983! ] Even worse if there were a possibility to have leader boxes with non-vanishing shift_amount. Then there would be a real bug since the value of cur_v/cur_h is not reset to base_line/left_edge after the leader boxes have been shipped out. Here is what I think ought to be changed: % All line numbers refer to TEX.WEB 3.141 as of March 16, 1992. @x [32] m.628 l.12462 - remove redundant (and misleading) code begin cur_v:=base_line+shift_amount(leader_box); synch_v; save_v:=dvi_v;@/ @y begin synch_v; save_v:=dvi_v;@/ @z [ dek -- $2.56 ] %--------------------------------------- @x [32] m.637 l.12605 - remove redundant (and misleading) code begin cur_h:=left_edge+shift_amount(leader_box); synch_h; save_h:=dvi_h;@/ @y begin synch_h; save_h:=dvi_h;@/ @z %--------------------------------------- [ dek -- In TeX change 668 (`Errors of TeX'] I decided that these shift amounts be zero, but I left the redundant code in case of future extensions.* Now I see your point about the potential "real bug" if somebody were to actually _use_ the feature. So I prefer to _leave_ these lines of code but to set cur_v:= base_line cur_h:=left_edge at close of \S628 and \S637 * not in TeX itself but in private versions, as in \S1340 ] Peter Breitenlohner ************************************************************************ >>> items sent 11 Jun 1993 Date: 30 Apr 1993 22:32:17 -0300 (BST) From: Chris Thompson Subject: Re: [alpha version, tex 3.1415] Dear Barbara, Here is a probably forlorn attempt to get a report in before your 30 April deadline: . No bugs found. It passed the usual paranoia tests. I have been using it myself (not very intensively) for routine (La)TeXing. I have had no adverse reports back from the 2-3 users I tried to subcontract the testing to (George Russell, Robert Hunt). . I have done a series of tests in respect of change #405 (Rainer's \setlanguage and associated problems): I felt I really ought to as Don has adopted the scheme I thought up in a particularly inspired moment last July (keeping the initial language/hyphenmin info for a paragraph in the pg_field)! It really does seem to work... . But a minor quibble: \showlists output now leaves no space between "language" and "hyphenmin" and the subsequent numbers when displaying this data. It used to show only the latter, but left a single space, which looked better. [ dek -- hmm, there's no accounting for taste ] . I *haven't* tested changes #404/#407, to do with boundary character logic, in any serious way. (I am rather hoping Brian has been doing some tests with his Greek fonts...) If you want to contact me while while you are in this country, my work telephone number is 0223 (Cambridge) - 334715. Chris Thompson %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Date: 02 Apr 1993 14:39:21 +0200 From: Bernd Raichle Subject: Small Bug in TeXbook: \downbracefill+\upbracefill TeXbook, Appendix B. Basic Control Sequences (page 357) states that The |\upbracefill| and |\downbracefill| macros have restricted usage: they must appear {\sl all by themselves\/} in an hbox or an alignment entry, except for horizontal spacing. otherwise the \vrule "makes a heavy black band, which is too horrible to demonstrate here" (TeXbook, page 331, answer of exercise 21.6, page 225). In the following example \downbracefill and \upbracefill "appear all by themselves in [..] an aligment entry": \halign{#&&\hfil#\hfil\cr &\kern 5cm &\kern 5cm\cr &\upbracefill &\downbracefill\cr \strut &\upbracefill &\downbracefill\crcr} The two \..bracefill in the third line of the \halign with the \strut in column one produce the mentioned "heavy black band". To correct the TeXbook, either 1) replace "alignment entry" to "complete alignment line" or something similar or 2) change the definition of \downbracefill and \upbracefill, specifying the height and the depth of the \vrule, e.g. \def\upbracefill{$\setbox\z@\hbox{$\bracelu$}\m@th \bracelu\leaders\vrule height\ht\z@ depth\dp\z@ \hfill\bracerd \braceld\leaders\vrule height\ht\z@ depth\dp\z@ \hfill\braceru$} [ dek -- [delete \dp, on two lines] ^^^ page E89: depth _is_ _zero_ ^^^ $2.56 ] and correct the statement about the restricted usage. I prefer change 2, because it allows the use of \..bracefill in normal text without a \hbox. [ dek -- agreed -- see plain fmtversion 3.1415 ] Yours, -bernd __________________________________________________________________________ Bernd Raichle, ISR, Universit"at Stuttgart | "Le langage est source home: Stettener Str. 73, D-W-7300 Esslingen, FRG | de malentendus" email: raichle@informatik.uni-stuttgart.de | (A. de Saint-Exupery) ------- Date: 05 Apr 1993 09:17:17 +0200 From: Bernd Raichle Subject: Re: Small Bug in TeXbook: \downbracefill+\upbracefill on 04 Apr 1993 13:42:57 -0400 (EDT), bbeeton said: you> however, he has already completed his annual examination and you> updated of tex and the texbook, and plans to look next at tex you> "about 15 months from now" (as of feb 27). (i will forward his you> comments on the bug reports and updates as soon as the "alpha" you> version of tex 3.1415 has been vetted and pronounced sound by you> the testers.) so you should certainly do what is necessary you> in the meantime to avoid this problem, if you encounter it you> again. This is ok for me. Btw, I'll checked the alpha 3.1415 version of TeX on labrea and IMHO there are two missing changes w.r.t. the change of \lefthyphenmin and \righthyphenmin: The fields |lhm_field| and |rhm_field| in |list_state_record| are [ dek -- ? they're gone ... change 405 in tex82.bug says to undo change 373 ... errata.tex correction to page B89 dated 27 Feb 93 removes them ... so I guess labrea is not up to date ] unnecessary, because 3.1415 uses the |pg_field| for this purpose. The same applies for the definitions of the WEB macros |lhmin| and |rhmin| in the next section. (tex.web 3.1415 alpha, \S 212 & 213) you> do you think this is a problem that might be encountered by you> others? it does remind me of a warning published in tugboat you> a while ago (9 #2, p.183) about the depth of a rule that was you> incompletely specified, and took on the depth of an element you> in another cell of an \halign. in that piece, one recommended you> solution was to use \leaders -- but since the \*bracefill you> macros already use \leaders, it looks like that isn't a valid you> solution. The TeXbook contains this warning and an explanation of this behaviour. (The behaviour of the \..bracefill macros with their current definition are correct.) But the restriction statement in appendix B, page 357 is not complete (as I have shown with the example in my bug report). Additionally the answer of exercise 21.6 (page 331) says: [..] This usually makes a heavy black band, which is too horrible to demonstrate here. However, it does work in the ^|\downbracefill| ^^^^^^^^^^^^ [ dek -- $2.56 ] macro of Appendix~B [..] The problem with this (mis)behaviour of \..bracefill: LaTeX's tabular/array environments puts automatically a \strut in column one of each alignment line making sure that the baseline distances are equal. Thus \..bracefill, which may be useful in a LaTeX `array', can not be used without modifications. you> i'll have to look over that again, and perhaps a you> new warning should be published. if so, i'll give you credit you> for the report; would you be willing to review such a piece you> before publication? Yes. Sincerely, -bernd ######################################################################## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Character code reference %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ % Lower case letters: abcdefghijklmnopqrstuvwxyz % Digits: 0123456789 % Square, curly, angle braces, parentheses: [] {} <> () % Backslash, slash, vertical bar: \ / | % Punctuation: . ? ! , : ; % Underscore, hyphen, equals sign: _ - = % Quotes--right left double: ' ` " %"at", "number" "dollar", "percent", "and": @ # $ % & % "hat", "star", "plus", "tilde": ^ * + ~ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [ end of message 042 ] From BNB@MATH.AMS.ORG Sun Sep 12 17:06:33 1993 Flags: 000000000001 Return-Path: Received: from vs3002.ams.org by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA25348; Sun, 12 Sep 93 17:06:24 MDT Received: from MATH.AMS.ORG by MATH.AMS.ORG (PMDF #2306 ) id <01H2VC1WIYSWMICI40@MATH.AMS.ORG>; Sun, 12 Sep 1993 18:31:21 EST Date: 12 Sep 1993 18:31:15 -0400 (EDT) From: bbeeton Subject: TeX 3.1415 and other updates -- file 1 of 2 To: tex-implementors@MATH.AMS.ORG Message-Id: <747873075.265629.BNB@MATH.AMS.ORG> Content-Transfer-Encoding: 7BIT Mail-System-Version: Date: 11 Sep 93 Message No: 041 To: TeX implementors and distributors From: Barbara Beeton Subject: TeX 3.1415 and other updates -- file 1 of 2 The /tex area at labrea.stanford.edu was updated on Sep 4 with Knuth's most recent versions of TeX, MF, and a number of other items. The dates on these items vary from February to June 26 of this year, but in fact, there has not been an update at labrea since spring of 1992, so any file with date later than about April 1992 is almost certainly new there. The labrea updates are done by a volunteer, and without real management support -- the TeX project at Stanford has been closed for quite a few years now, and maintenance is not part of the official program. For this reason, some parts of the /tex area are being withdrawn from labrea in favor of the now more reliable CTAN archives: ftp.shsu.edu ftp.tex.ac.uk ftp.uni-stuttgart.de Concurrently with the updates of the Knuth material, the /tex/tugboat area was emptied and its contents replaced with a single README file pointing to the CTAN sites. I believe that Rainer Schoepf has just asked that the same thing be done with the /tex/latex directory, as maintenance is now officially in the care of the LaTeX3 project, and the canonical files originate in Germany. I have one administrative request: the last numbered message was sent to TeX-implementors in March 1991. Undoubtedly some addresses are out of date. I have checked the current addresses for those of you with whom I correspond regularly on other topics, or for whom I have noticed new addresses in postings to comp.text.tex, etc., but I'm not sure that I've got them all. I will know soon enough from the mailer the addresses that really don't work, but I would still appreciate an acknowledgement of receipt if this message gets through -- and an address update if you have a different preferred address. The files listed below have new dates, as compared with a directory listing from August 1992. It's not certain that all of these files came from Knuth (for example, the /tugboat README file didn't), but I will leave it to your judgment what you feel is important for you. In a separate message I am sending the commentary from Don on the bug reports of the past nearly year and a half. ######################################################################## new files at labrea.stanford.edu /tex/errata: -rw-r--r-- 1 468 56231 Aug 17 1992 cm85.bug -rw-r--r-- 1 468 16328 Jun 26 22:56 errata.eight -rw-r--r-- 1 468 31881 Aug 17 1992 errata.four -rw-r--r-- 1 468 29653 Feb 27 1993 errata.seven -rw-r--r-- 1 468 15837 May 18 1992 errata.six -rw-r--r-- 1 468 4005 Jun 26 23:00 errata.tex -rw-r--r-- 1 468 150842 Jun 26 16:40 errorlog.tex -rw-r--r-- 1 468 310855 Jun 26 16:36 tex82.bug /tex/lib: -rw-r--r-- 1 468 3448 Mar 24 07:37 logo.mf -rw-r--r-- 1 468 22628 Jun 26 22:48 plain.mf -rw-r--r-- 1 468 44102 Jun 26 06:38 plain.tex /tex/local/cm: -rw-r--r-- 1 468 3700 Jan 3 1993 cmsl6.mf -rw-r--r-- 1 468 3804 Sep 7 12:46 gen.mf /tex/local/etc: -rw-r--r-- 1 468 797 Jul 17 1992 Makefile /tex/local/lib: -rwxr-xr-x 1 468 2499 Aug 13 1992 blackdvi.tex -rwxr-xr-x 1 468 258 Aug 15 1989 blackimagen.mf -rwxr-xr-x 1 468 333 Aug 24 1992 blacklino.mf -rwxr-xr-x 1 468 7494 Aug 13 1992 colordvi.tex -rwxr-xr-x 1 468 18480 Mar 10 1993 ctwimac.tex -rwxr-xr-x 1 468 15314 Jun 12 06:36 cwebmac.tex -rwxr-xr-x 1 468 2153 Aug 18 1992 e.mft -rwxr-xr-x 1 468 8210 Aug 13 1992 epsf.tex -rwxr-xr-x 1 468 4081 Nov 24 1992 local.mf -rwxr-xr-x 1 468 72673 Jun 8 1992 mfman.mf -rwxr-xr-x 1 468 421 Feb 23 1993 mproof.tex -rwxr-xr-x 1 468 15836 Mar 7 1993 proofmac.tex -rwxr-xr-x 1 468 1936 Aug 13 1992 rotate.tex -rwxr-xr-x 1 468 210 Aug 24 1992 slantlino4.mf -rwxr-xr-x 1 468 8343 Jun 23 04:24 xepsf.tex /tex/local/mf: -rwxr-xr-x 1 468 2048 Aug 19 1992 Makefile -rwxr-xr-x 1 468 12603 Jul 17 1992 ext.c -rwxr-xr-x 1 468 680 Feb 22 1993 ini_to_trap -rwxr-xr-x 1 468 54327 Feb 22 1993 inimf.ch -rwxr-xr-x 1 468 22157 Aug 19 1992 mf.pool -rwxr-xr-x 1 468 2645 Aug 19 1992 mf_sunwin.c -rwxr-xr-x 1 468 56644 Jun 26 22:51 plain.base -rwxr-xr-x 1 468 696 Jun 26 22:51 plain.log /tex/local/mfware: -rw-r--r-- 1 468 31182 Jun 8 1992 gf2dvi.ch /tex/local/tex: -rw-r--r-- 1 468 1960 Mar 20 06:13 Makefile -r--r--r-- 1 468 41 Aug 10 1989 dvitype.in -rw-r--r-- 1 468 13234 Jul 17 1992 ext.c -rwxr--r-- 1 468 705 Jan 26 1992 ini_to_trip -rw-r--r-- 1 468 53901 May 1 19:26 initex.ch -rw-r--r-- 1 468 166300 Jun 26 17:07 plain.fmt -rw-r--r-- 1 468 2415 Jun 26 17:07 plain.log -rw-r--r-- 1 468 25806 Jun 26 16:59 tex.pool /tex/local/texware: -rw-r--r-- 1 468 834 Jul 17 1992 Makefile /tex/local/web: -rw-r--r-- 1 468 705 Jul 17 1992 Makefile -rw-r--r-- 1 468 23671 Feb 28 1993 tangle.ch -rw-r--r-- 1 468 47215 Feb 28 1993 tangle.p /tex/mf: -rwxr-xr-x 1 468 917972 Feb 25 1993 mf.web -rwxr-xr-x 1 468 939224 Jun 26 22:47 mfbook.tex /tex/tex: -rw-r--r-- 1 468 1027648 Jun 26 16:28 tex.web -rw-r--r-- 1 468 1383013 Jun 26 16:22 texbook.tex -rw-r--r-- 1 468 2436 Feb 27 1993 trip.fot -rw-r--r-- 1 468 184117 Feb 27 1993 trip.log -rw-r--r-- 1 468 22682 Feb 27 1993 trip.tex -rw-r--r-- 1 468 18062 Feb 27 1993 trip.typ -rw-r--r-- 1 468 12895 Feb 27 1993 tripin.log /tex/tugboat: -rw-r--r-- 1 468 1440 Sep 7 13:20 README /tex/web: -rw-r--r-- 1 468 130099 Feb 28 1993 tangle.web -rw-r--r-- 1 468 187249 Jan 12 1992 weave.web -rw-r--r-- 1 root 1156534 Jun 18 16:59 web-5.84b.tar.gz -rw-r--r-- 1 root 1180627 Jun 18 17:00 web-5.851b.tar.gz -rw-r--r-- 1 root 1180628 Jun 18 17:00 web-5.851c.tar.gz -rw-r--r-- 1 root 1166500 Jun 18 17:01 web-5.851d.tar.gz -rw-r--r-- 1 root 1166493 Jun 18 17:01 web.tar.gz -rw-r--r-- 1 root 336272 Jun 18 17:02 web2c-5.84b.tar.gz -rw-r--r-- 1 root 381425 Jun 18 17:02 web2c-5.851b.tar.gz -rw-r--r-- 1 root 386993 Jun 18 17:02 web2c-5.851c.tar.gz -rw-r--r-- 1 root 441904 Jun 18 17:02 web2c-5.851d.tar.gz -rw-r--r-- 1 root 441897 Jun 18 17:02 web2c.tar.gz ######################################################################## xxx ######################################################################## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Character code reference %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ % Lower case letters: abcdefghijklmnopqrstuvwxyz % Digits: 0123456789 % Square, curly, angle braces, parentheses: [] {} <> () % Backslash, slash, vertical bar: \ / | % Punctuation: . ? ! , : ; % Underscore, hyphen, equals sign: _ - = % Quotes--right left double: ' ` " %"at", "number" "dollar", "percent", "and": @ # $ % & % "hat", "star", "plus", "tilde": ^ * + ~ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [ end of message 041 ]