It's a decision of AMS to have section numbers without chapter prefix numbers and to reference sections also without the chapter numbers. With, e.g., the standard classes sections would be numbered
chapter.
section and therefore references would also be with the chapter number.
However, since 2019-10-01 LaTeX provides
\labelformat
to define the format of the counter reference. You can use
\labelformat{section}{\thechapter.\thesection}
to add the chapter number and a dot as prefix to the references.
\documentclass{amsbook}
\usepackage{cleveref}
\labelformat{section}{\thechapter.#1}% use prefix "\thechapter." for
% references to sections
\begin{document}
\chapter{One}
\section{Section 1}
We'll be covering some interesting topics in \cref{sec:Ch2Sec2}
\section{Section 2}
There's nothing interesting here.
\chapter{Two}
\section{Section 1}
Later, it will be \cref{sec:Ch2Sec2}
\section{Section 2} \label{sec:Ch2Sec2}
Very interesting stuff.
\end{document}
This works with and without cleveref. There may be other cleveref specific solutions, but I prefer this one, that still works, if I don't use cleveref.
If you'd get an error about undefined
\labelformat
you should update LaTeX. However, there is also an old method to do the same:
Code: Select all
\makeatletter
\def\p@section{\thechapter.}
\makeatother