latex3 / latex2e

The LaTeX2e kernel
https://www.latex-project.org/
LaTeX Project Public License v1.3c
1.88k stars 261 forks source link

fntguide: No redefinition information in the transcript file #1242

Open SwitWu opened 8 months ago

SwitWu commented 8 months ago

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

davidcarlisle commented 6 months ago

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.

josephwright commented 6 months ago

@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.

FrankMittelbach commented 6 months ago

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