I am trying to get threeparttable to work with the tufte-book class. Naturally, when I use the follwing the caption will be placed in the margin. In this case, cleveref has no problems in getting the reference right (i.e. it correctly prints the "Table"):




        \caption{Table caption}
        Some & tabular \\
        Contents & \ldots

See \cref{tab:foo}.


enter image description here

Now I want to put the caption above the table, similar to the requirement in this question.

Since it looks like redefining caption is not feasible, I tried to roll my own caption by defining (as a starting point):


Using \mycaption{Table} instead of \caption{Table caption} in the above example yields:

enter image description here

This puts the caption in the right place, but some features are missing:

  1. Centering the caption above the table if it is shorter than one line.
  2. Getting the references right with \cref. (This could not be resolved even after rerunning the document several times.)
  3. Adding the table to the list of tables.
  4. Possibility of providing a short form of the caption for the list of tables as asecond argument.

Is there any way to either a) use the existing \caption functionality and simply change the position to above the tabular or b) extend my \mycaption command to behave just like \caption in the standard classes, i.e. meet requirements 1-4?

1 Answer 1


EDIT (see below for old answer):

Here is the improved version that I ended up using. I recommend to put it in the tufte-book-local.tex file. It defines a "classic caption style" that fulfils all the requirements posed in the question, and activates this style at the beginnin of each instance of threeparttable:

        \addcontentsline{\csname ext@##1\endcsname}{##1}%
        {\protect\numberline{\csname the##1\endcsname}{\ignorespaces ##2}}%
        \@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par
        \sbox\@tempboxa{\@tufte@caption@font##1: ##2}%
        \ifdim \wd\@tempboxa >\hsize
        \@tufte@caption@font\if@tufte@margtab\@tufte@caption@justification\fi##1: ##2\par
        \global \@minipagefalse
    %   \setcaptionfont{\normalfont}


Old answer:

Digging through tufte-common.def I found that at the first instance of a float, the original definitions of \caption and \label are saved in the macros \@tufte@orig@caption and \@tufte@orig@label.

Since I could not patch the @tufte@float environment, I used etoolbox to restore the original caption and label commands at the beginning of each threeparttable environment:


This yields the exact same behaviour as in the standard classes (optional argument possible, etc.) except for the alignment. I presume the alignment is different since tufte-altex defines \@makecaption differently than the standard classes.

I don't know if this method has any weird side effects, but so far it has worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .