Caption begins inside table in tufte-book

captionstablestufte-book

If I use the table* environment and the table is wide, the caption starts inside the table. Here is the example

\documentclass{tufte-book}

\begin{document}
\begin{table*}[h!]
  \begin{tabular}{l}
    This will be a wide table so that the caption  will start inside the table, unfortunately\\
    This will be a wide table so that the caption  will start inside the table, unfortunately\\
    \hline
  \end{tabular}
  \caption{Notations}
  \label{table:toowide}
\end{table*}
\end{document}

I certainly could use a \bigskip before the \caption as a workaround, but I think moving the caption furher to the right would be preferrable.

table_in_tufte_book

Best Answer

In the tufte-book captions are placed in a margin. In the case of use of the wide table or figure environment you need define offset of caption. Details are described in the package documentation, so here two cases: caption above table and below table:

\documentclass{tufte-book}

\begin{document}
\begin{table}[ht]
  \begin{tabular}{l}
  \hline
    This will be a wide table so that the caption  will start inside the table, unfortunately\\
    This will be a wide table so that the caption  will start inside the table, unfortunately\\
    \hline
  \end{tabular}
  \caption[][-3ex]{Caption is above table}
%  \setfloatalignment{t}
  \label{table:toowide}
\end{table}
\begin{table}[ht]
  \begin{tabular}{l}
  \hline
    This will be a wide table so that the caption  will start inside the table, unfortunately\\
    This will be a wide table so that the caption  will start inside the table, unfortunately\\
    \hline
  \end{tabular}
  \caption[][2ex]{Caption is below table}
  \setfloatalignment{b}
  \label{table:toowide}
\end{table}
\end{document}

enter image description here