[tex-k] Another bug in webmac

Andreas Scherer andreas_tex at freenet.de
Mon Aug 9 22:00:51 CEST 2021


Hello, Wolfgang,

> while trying to fix webmac.tex, I discovered another error: It
> occurs, when the name of a module contains the string macro (\.)
AFAIR, this is not a bug, but a feature of both WEB amd CWEB.

'webman' expressly warns on page 4 (and again on page 7): Caution: Do 
not use TEX control sequences in such titles, unless you know that the 
webmac macros will do the right thing with them. The reason is that 
these titles are converted to uppercase when they appear as running 
heads, and they are converted to boldface when they appear at the 
beginning of their modules, and they are also written out to a 
table-of-contents file used for temporary storage while TEX is working; 
whatever control sequences you use must be meaningful in all three of 
these modes.

This modified version of your example works, at least with 'plain TeX':

\message{\fmtversion}
\def\title{bug}
@* {\tt A WEB module}. % '\tentt' works quite as well
@p program d(input, output);
begin write_ln('hello, world')
end.
@* Index.

Note that this does _not_ work well with 'pwebmac.tex': The module title 
is not 'sanitized' in the bookmark tab.

Happy WEB programming!
Andreas


More information about the tex-k mailing list.