0

This post explains how to get rid of captions for all figures in tufte-book class, but I need to remove captions just for figures which don't have caption. marginfigure environment has no problem with it and when the figure has no caption, it just prints its label (e.g. Figure 1:).

Now my question is how to do with figure environment (having figure with label). A sample code is like as the following:

\documentclass{tufte-book}
\usepackage{graphicx}

\begin{document}
\begin{figure}
\begin{center}
\includegraphics[scale=1]{sine.pdf}
\caption{I have no text for this caption and need to only print the 
label.} %%% When I use \caption{}, I get nothing!
%\caption{}
\label{fig:figureX}
\end{center}
\end{figure}
\end{document}
3
  • It is a bit unclear what you mean exactly. Could you make a small example document (MWE) that illustrates the current and the desired behavior? A possible solution is not to use the figure environment at all (just put \includegraphics or \begin{tikzpicture} etc. directly at the preferred position in the document).
    – Marijn
    Oct 6, 2017 at 8:22
  • as a workaround you can use a single space (\caption{ }) which generates a label (but is not displayed itself).
    – Marijn
    Oct 6, 2017 at 13:30
  • @Marijn What a simple beautiful trick!
    – MEDVIS
    Oct 6, 2017 at 18:15

0

You must log in to answer this question.

Browse other questions tagged .