[tex-k] Another bug in webmac

Wolfgang Helbig helbig at mailbox.org
Mon Aug 9 20:00:53 CEST 2021

Dear all,

while trying to fix webmac.tex, I discovered another error:
It occurs, when the name of a module contains the string macro (\.)
This example shows the bug:
$ cat ex.web
@* {\.{A WEB module}}.
@p program d(input, output);
begin write_ln('hello, world')
@* Index.
$ wve ex.web
This is WEAVE-FPC, 3rd ed.
Writing the output file...*1*2
Writing the index...Done.
(No errors were found.)
This is TeX-FPC, 4th ed. (no format preloaded)
(ex.tex (TeXinputs/webmac.tex) 3.1415926535+WEBMAC4.2 *1 [1] *2 Index: [2]
Section names: Table of contents: (CONTENTS.tex
! Missing control sequence inserted.
<inserted text>
<to be read again>
<argument> ...it =\/\kern .05em}\BS \let {
                                           \accent 19 =}{\fam \ttfam \...
\Z #1#2#3->\line {\ignorespaces #1
                                    \leaders \hbox to .5em{.\hfil }\hf...
l.1 ...tenbf =\/}\AM A WEB module}}}{1}{1}
                                           ? x
Output written on ex.dvi (2 pages, 1016 bytes).
Transcript written on ex.log.

The bug is caused by \let assignments in the \. macro. Since a \write 
expands its argument, TeX expands the arguments of the let-assignment. 
E.g., if you have \def\a{a} and \def\b{b}, TeX turns a harmless looking 
"\let\a\b" to a desastrous "\let a b". I've fixed this error in the 
upcoming TeX-FPC 5ed. But I couldn't fix the bug when the name contains 
special string characters like "\.{A \`WEB\' module}".



-------------- next part --------------
A non-text attachment was scrubbed...
Name: helbig.vcf
Type: text/x-vcard
Size: 4 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-k/attachments/20210809/01e37aa1/attachment.vcf>

More information about the tex-k mailing list.