[tex-k] Module name typesetting bug in either tangle.web or weave.web

Doug McKenna doug at mathemaesthetics.com
Thu Mar 26 02:57:29 CET 2020


Does Pascal have a single-char equivalence operator ''≡'? I don't think so, since all Pascal source code, certainly back in the day, was written in ASCII. This is an "operator" introduced by weave into the typeset version of a program, solely to signify a mathematical idea (equivalence or definition or whatever) between a module name as phrase and all the Pascal code it represents later on. 

If a program written in WEB is trafficking in sequences of '=' signs, that is part of the mental model of anyone (such as myself in the time of cholera) who might be trying to understand what that program is doing with all its input characters. This particular module name is supposedly describing the innards of a program, and its typesetting should reflect those innards so as not to violate a reader's mental model. 

IMHSHO, anyway. 


Onward, into the fog ... 

- Doug 



From: "Shreevatsa" <shreevatsa.public at gmail.com> 
To: "doug" <doug at mathemaesthetics.com> 
Cc: "tex-k" <tex-k at tug.org> 
Sent: Wednesday, March 25, 2020 6:20:48 PM 
Subject: Re: [tex-k] Module name typesetting bug in either tangle.web or weave.web 

On Wed, 25 Mar 2020 at 12:34, Doug McKenna < [ mailto:doug at mathemaesthetics.com | doug at mathemaesthetics.com ] > wrote: 


All - 

Line 3115 (or thereabouts) of tangle.web, at, e.g., 

< [ http://ctan.math.utah.edu/ctan/tex-archive/systems/knuth/dist/web/tangle.web | http://ctan.math.utah.edu/ctan/tex-archive/systems/knuth/dist/web/tangle.web ] > 

is: 

@ @<If the next text is `|(#)==|'...@>= 

which concerns processing the text of a WEB parametric macro in the input file. 

But if you look at the output in Section 174 of tangle.pdf that this line starts, at (e.g.) 

< [ http://texdoc.net/texmf-dist/doc/generic/knuth/web/tangle.pdf | http://texdoc.net/texmf-dist/doc/generic/knuth/web/tangle.pdf ] > 

you see that the pair of equal signs *within* the typeset module name (and further within an alleged verbatim TeX context!) has been incorrectly replaced with the mathematical equivalence sign '≡'. The thing is, there are no equivalence signs in the input text of a ".web" file that tangle processes; they are a nicety used by weave to replace certain uses of '==' when typesetting the algorithms. 

This module name in tangle.web is clearly referencing the ASCII character pair, and clearly expecting them to be typeset verbatim, so I would argue that the typeset version of tangle.web is incorrect. 



A minor matter no doubt, and I'm just commenting from the sidelines, but IMO it seems debatable whether there is anything incorrect here :) If you look at the documentation of WEB, specifically the bottom of page 4: [ http://texdoc.net/texmf-dist/doc/generic/knuth/web/webman.pdf#page=4 | http://texdoc.net/texmf-dist/doc/generic/knuth/web/webman.pdf#page=4 ] then what it says about the |...| syntax is that things within it are supposed to typeset the way Pascal code is typeset. 



So when the module name contains |(#) ==| then the way it has been typeset by WEAVE matches that documentation, because that is how the equivalent Pascal code would be typeset by WEAVE. (See also how many other module names are typeset, including 176 which has the same “==”.) 
Perhaps you can argue (and I guess what you're saying is) that Knuth should have chosen a different module name in the source code, as he means those literal characters rather than Pascal code (e.g. written "\.{(\#) ==}" or something like that: haven't tested this). As the risk of confusion seems low here, this seems up to his judgment or taste, but maybe he would agree :-) 


BQ_BEGIN

I'm not sure what the fix is, (a) whether it should be on this line 3115 in tangle.web, or (b) if it concerns the logic of how weave.web works when typesetting module names or verbatim quotes inside TeX code inside module names, or (c) if it's some combination of all. 

Or, as sometimes happens, I might be misunderstanding something else. 

Thoughts? 


FWIW, 

Doug McKenna 


BQ_END


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-k/attachments/20200325/3b59b194/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 112774 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-k/attachments/20200325/3b59b194/attachment-0001.png>


More information about the tex-k mailing list.