latex2e icon indicating copy to clipboard operation
latex2e copied to clipboard

fntguide: No redefinition information in the transcript file

Open SwitWu opened this issue 1 year ago • 3 comments

Brief outline of the bug

The fntguide says that:

\DeclareTextSymbol {⟨cmd⟩} {⟨encoding⟩} {⟨slot⟩}

This command defines a text symbol with slot ⟨slot⟩ in the encoding. For example, the definition of \ss in the OT1 encoding is: \DeclareTextSymbol{\ss}{OT1}{25}. It does not produce an error if the command has already been defined but logs the redefinition in the transcript file.

But in fact there isn't any redefinition information in the log when redefining something like \ss.

Minimal example showing the bug

\documentclass{article}
\DeclareTextSymbol{\ss}{OT1}{28} % 28 is the slot occupied by \o
\begin{document}
\ss\o
\end{document}

Log file (required) and possibly PDF file

a.log

SwitWu avatar Jan 16 '24 11:01 SwitWu

Thanks for your report, I think this has only been wrong for 30 years:-)

The same true of similar \DeclareTextCommand

I tested as far back as texlive 2014 and these commands have not logged in that time.

The commands last changed in any significant way after this report in 2004

https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/3563

and the change there does not remove logging so I think the current behaviour has been there from the start.

The fntguide text looks to have been copied from \DeclareTextFontCommand (which does log).

I think we should fix the guide to match the code, not the other way round.

davidcarlisle avatar Mar 17 '24 13:03 davidcarlisle

@davidcarlisle I think a change would match the position we seem to have arrived at more generally, i.e. that \Declare... should log any redefinition.

josephwright avatar Mar 17 '24 17:03 josephwright

I guess we should probably do that even if it is a change after 30 years.

FrankMittelbach avatar Mar 18 '24 10:03 FrankMittelbach