9

Since my last update of the TeXlive2020 installation some days ago I have the following problem. I am using since years the macro \newcommand{\C}{\mathbf{C}} for typing the complex numbers. Suddenly, I got the following error messages:

LaTeX Error: Command \C already defined.
               Or name \end... illegal, see p.192 of the manual.

LaTeX Error: Command \U already defined.
               Or name \end... illegal, see p.192 of the manual.

LaTeX Error: Command \G already defined.
               Or name \end... illegal, see p.192 of the manual.


Using `latexdef -f C` I got `\C: undefined`

I checked the entries here at tex.stackexchange.com and found, that this seems to have to do with the hyperref-package. Indeed, if I run TeX with or without hyperref, I got different messages:

Without:

\long macro:->\mathbf {C}
\long macro:#1->\mathfrak {U}(#1) 
\long macro:->\mathcal {G}

With:

macro:->\PU-cmd \C \PU\C 
macro:->\PU-cmd \U \PU\U 
macro:->\PU-cmd \G \PU\G

I have to say that my definitions are called after the hyperref-package. If I define \newcommand{\C}{\mathbf{C}} after calling hyperref everything is working fine. I would like to understand why this now happens and not all the years before.

Operating SYstem: Mac OS X 11.2 (Big Sur), TeXlive2020 via MacTeX-2020.

Remark: I have just (2020/02/01 1 pm) updated thee system and the \C-problem has gone but the \G and \U problems are still there.

1 Answer 1

12

hyperref switched the default encoding for pdflatex from pdfdoc to unicode (as it was already the case for the unicode engine for quite some time). This has been done to simplify the code and harmonize the behaviour across the various engines.

This change means that hyperref now loads puenc.def with all engines. puenc.def contains quite a lot definitions needed for the bookmarks for text symbols, including definitions for some accent commands used e.g. in cyrillic like \C, \G and \U.

There is already a new hyperref on ctan which reduces the clashes:

\C will only be defined if the cyrillic command \CYRDZE is defined previously.

\U will be handled similar in the next update.

\G has been moved to an extra file, which can be loaded manually.

See also the github issue here https://github.com/latex3/hyperref/issues/170

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .