Figure referencing in tufte-book pointing to section instead

The \ref command usually points to the figure/table/etc that is referenced by \label. However in the tufte-book document class this does not seem to work:

\documentclass[]{tufte-book}
\begin{document}
\section{Newsection}
Some text here.
\clearpage
\begin{figure*}
\rule{1in}{1in}
\caption{Figure 1}
\label{fig:f1}
\end{figure*}
\end{document}


Instead, the reference simply points quietly to the section header above without giving an error. I tried putting the \label command in different places or using different figure environments (figure*, figure, marginfigure). I am using the pdflatex command to compile the above example, I have the pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016) distribution.

Is there a way to solve this?

• i can't reproduce your problem. referencing works correctly. welcome to tex.se! – Zarko Sep 2 '18 at 11:38
• well, then there is hope that I will figure out my problem. Which operating system are you using? Which tex distribution? – Quasilattice Sep 2 '18 at 17:00
• I just found a similar question: link but the solution seems to be a fudge (just using a different reference package) – Quasilattice Sep 3 '18 at 8:30

this is extended comment ...

with your mwe i can reproduce problem which you reported in question. for better see, that referencing in your document working well, i slightly extend your code to:

\documentclass[justified]{tufte-book}
\usepackage{microtype}
\usepackage{graphicx}

\usepackage{lipsum}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
\section{First section}
\lipsum[11]

\section{Second section}
\lipsum[12]
\begin{figure}
\centering
\includegraphics[width=0.5\linewidth]{example-image-duck}
\caption{Caption of the figure 1}
\label{fig:f1}
\setfloatalignment{b}
\end{figure}

\section{Third section}
The basic idea is illustrated on the Fig.~\ref{fig:f2}.
\lipsum[13-14]
\begin{figure*}
\includegraphics[width=\linewidth]{example-image-duck}
\caption{Caption of the figure 2}
\label{fig:f2}
\end{figure*}

all extension doesn't influence anyhow to working of hyper links. all works as it is expected. i test this code with recent MikTeX using pdfLaTeX engine. however i'm pretty sure that this should works with other not so recent latex installation too. please test my mwe and let me know, if it is working as expected.