tufte-latex
tufte-latex copied to clipboard
\ref to \begin{figure} not working
Hello,
I am encountering a very strange problem. The \refs to marginfigures work, but not to \begin{figure} nor to \begin{figure*}. The figures do all get numbered, but in the text there is just an empty space. I do NOT get ?? which would be a typical error for a wrong reference. Instead I get this error message:
Package hyperref Warning: Suppressing empty link on input line 25.
Here is an example of one reference to a figure. I include these tex files with \input into the main .tex document.
The difficulties to work together on a shared project are based on three barriers (see Figure \ref{fig:threecirclesdisciplines}) between designers [D], engineers [E] and scientists (in particular social scientists) [S]:
\begin{figure}[ht]
\includegraphics[width=0.8\textwidth]{what-is-hri/graphics/three-circles-disciplines.pdf}
\caption{Barriers between the disciplines}
\label{fig:threecirclesdisciplines}
\end{figure}
This is what the compiled text looks like:

I found this post that describes a very similar problem but their solution does not work for us"
https://tex.stackexchange.com/questions/134633/figure-references-in-tufte-book
We are using ShareLatex for writing and compiling.
Does anybody have an idea what is going wrong?
I had the same issue using pdflatex. I solved it by removing the subfigure package. Even if it not used it creates this bug.
Here is a minimal script that triggers the bug :
\documentclass{tufte-book} \usepackage{subfigure}
\title{simple test} \author{Mathieu Lagrange}
\begin{document}
\begin{figure*} \caption{Caption.}\label{fig:piano} \end{figure*}
Here is a minimal test. There should be a one between this \ref{fig:piano} and this.
\end{document}
I am not an expert in tex, so I cannot dig further. Before this is solved, may be the tufte package should trigger a clash with the subfigure package ?