I use the cleveref to cross-reference my equations and I have no problems with the equation and align environments. However, when using the gather environment, the cross-reference reads: "Section x.y.z" instead of "Equation x.a".

How to ensure that cleveref refers to gather as equations?


Note that I have an appendix wher I changed the "section" printed by 'cleveref' to "appendix".

% !TeX program = lualatex


\usepackage{amsmath} % Bold math symbols

\usepackage[nameinlink]{cleveref} % For capitalized ref
\usepackage{appendix} % Needed to trigger clevref names change for appendix sections

\AtBeginEnvironment{appendices}{\crefalias{section}{appendix}} % To rename sections in clevref when entering appendices
\AtEndEnvironment{appendices}{\crefalias{section}{section}} % To rename sections back in clevref when leaving appendices

    \chapter{My chapter}
    \section{My section}

    This is an equation in the 'equation' environment:
    a = b
    This is an equation in the 'align' environment:
    a &= b
    \nonumber \\
    c &= d
    This is an equation in the 'gather' environment:
    a = b
    \nonumber \\
    c = d
    I can use the package 'cleveref' with 'equation' and 'align: these are cross-references to \Cref{Eq_equation} and \Cref{Eq_align}.
    But it does not work with 'gather': this is a cross-reference to \Cref*{Eq_gather}.
  • 2
    Could you please post a minimal (non)working complete code?
    – Bernard
    Oct 29, 2020 at 10:12
  • 1
    Using the simplest of MWEs I have no issues with cleveref and gather so please provide code as Bernard mentions.
    – daleif
    Oct 29, 2020 at 10:18
  • @Bernard Yes, sorry it took a while to get a MWE from my whole thesis. It is now added to the question.
    – AlMa
    Oct 29, 2020 at 10:43
  • 1
    you have used the label on an unnumbered line, what do you want it to refer to? Oct 29, 2020 at 10:45
  • @DavidCarlisle To the equation 1.2 composed of the two lines. This is currently the behaviour I am looking for with the 'align' environment
    – AlMa
    Oct 29, 2020 at 10:47

1 Answer 1


In gather each line is numbered separately and so can have a separate label, in this case the \label is in an unnumbered like due to \nonumber so it references the currently active label which is typically the most recent section heading.

The same ought to be true of align but the processing of align is more involved and if it picks up something more useful in that case, that is by accident not design.

You must log in to answer this question.

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