Today I updated ubuntu eoan to focal, and with it texlive got updated, too. After the update, while trying to recompile a huge book using dozens of packages, I got

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

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

l.952 \newcommand*{\Ref}{\keyword{ref}}


I know that my work defines \Ref this way. Who else defines \Ref? I thought that internal macroses of other packages should contain @ in them to avoid clashes with user-defined macroses. Or is \Ref in the public interface of some package now?

  • 2
    Well you are the one who knows which packages your code loads. – Ulrike Fischer Apr 27 at 18:27
  • 2
    you only need to add \show\Ref in suitable places. – Ulrike Fischer Apr 27 at 18:28
  • 2
    @Just_A_Man That would be a good start. – Alan Munn Apr 27 at 18:31
  • 2
    In all places that would help you to identify the package which defines the command. – Ulrike Fischer Apr 27 at 18:32
  • 1
    \Bbbk is defined in amssymb at least, and that's font related, so you know that any other definition would be in a font-related package. When the problem with \Ref was reported, did you kill the job immediately, or let it continue? That report would have still been in the preamble, so if you let the job continue until it gets into the actual processing of the body, you can probably identify most of the package-conflict problems at once. – barbara beeton Apr 27 at 18:43

The \Ref command, formerly part of the fncylab package, has now been incorporated into the LaTeX kernel. It is designed to provide a capitalized label format for references at the beginning of a sentence. Here's a minimal example:

\labelformat{section}{section #1}
This is a normal reference to \ref{foo}. 
\Ref{foo} is referred to at the beginning of a sentence and is therefore capitalized.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy