Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying a lot of subfloat-like packages with tufte-latex and all of them seem to interact badly with tufte-latex in the matter of labels, refs and captions. To captions I could find solutions thanks to you guys, but refs are still elusive.

Originally no numbering was appearing in the figures, but now the numbers appear but can't be referenced by the labels.

The following minimal examples show what's wrong. Both results in undefined references for the tufte-handout class and work perfectly with article.

\documentclass{tufte-handout}

\usepackage[demo]{graphicx}
\usepackage[caption=false]{subfig}

\begin{document}
\begin{figure}
\centering
  \subfloat[Subfigure 1] % caption for subfigure 1
  {
    \label{fig:sub1}
    \includegraphics[scale=0.5]{subfig1.eps}
  }
  \subfloat[Subfigure 2] % caption for subfigure 2
  {
    \label{fig:sub2}
    \includegraphics[scale=0.5]{subfig2.eps}
  }
  \caption{Results for subfigure}
  \label{fig:results}
  \end{figure}
  In the text, you can refer to subfigures of figure \ref{fig:results} as \ref{fig:sub1}, \ref{fig:sub2}, \subref{fig:sub1}, \subref{fig:sub2}.
\end{document}

This one also works ok with captions but mess up references (gives undefined references with tufte-handout, but works ok with article).

\documentclass{tufte-handout}

\usepackage{caption}
\usepackage{subcaption}
\usepackage[demo]{graphicx}
\captionsetup{compatibility=false}

\begin{document}
\begin{figure}
\centering
  \begin{subfigure}[b]{0.5\textwidth}
    \includegraphics{subfig1.eps}
    \caption{Subfigure 1}
    \label{fig:sub1}   
  \end{subfigure}
  ~
  \begin{subfigure}[b]{0.5\textwidth}
    \includegraphics{subfig2.eps}
    \caption{Subfigure 2}
    \label{fig:sub2}   
  \end{subfigure}
  \caption{Results for subfigure}
  \label{fig:results}
\end{figure}

In the text, you can refer to subfigures of figure \ref{fig:results} as \ref{fig:sub1}, \ref{fig:sub2}, \subref{fig:sub1}, \subref{fig:sub2}.
\end{document}

Are there any other subfloat packages that would work with tufte-latex? Or maybe a way to make the above packages work.

share|improve this question
4  
The code of tufte-common.def suggests it is compatible with the subfigure package. However, the`subfigure` package is often considered to be obsolete. I believe a feature request to the tufte-latex developers (=> compatibility with the subcaption package) seems reasonable... – cgnieder Dec 17 '12 at 22:36

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.