4

In the following table I created the caption exactly they way I wanted. I'd like to add a "Note" below the tabular, but within the table environment, following the same style as the caption. I sort of achieved what I wanted with the following. But it seems very hacky. There must be a better way, right? E.g., is there some starred version of \caption that suppresses the float number? If there were I could just add that below the tabular. That sure would be easiest. I've checked the caption package and there seems to be no such thing. Any other solutions?

\documentclass{article}
\usepackage{booktabs}
\usepackage[margin=10pt,font=small,labelfont=bf,labelsep=colon,tableposition=top,figureposition=top]{caption}
\usepackage[leftmargin=10pt,rightmargin=10pt]{quoting}
\begin{document}
  \begin{table}[ht]
    \centering
    \caption{My caption. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.}
    \begin{tabular}{ll}
      \toprule
      foo & bar \\
      \midrule
      baz & bog \\
      \bottomrule
    \end{tabular}
    \begin{quoting}
      {\small {\bf Note:} a note Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.}
    \end{quoting}
  \end{table}
\end{document}

tab1

David Carlisle
  • 757,742
lowndrul
  • 5,323
  • The floatrow package might be of interest. Have a look at http://tex.stackexchange.com/questions/9547/floatrow-changing-the-font-of-table-footnotes – lockstep Jan 24 '12 at 21:57
  • 3
    The caption package actually do offer \caption*. See section 3.1 "Typesetting captions" of the caption package documentation. Other option (beside using self-defined commands) is using one of the packages which offers table notes, e.g. the threeparttable package. –  Jan 25 '12 at 08:47

1 Answers1

3

You could use the floatrow package and its \floatfoot macro.

\documentclass[a4paper]{article}
\usepackage{booktabs}
\usepackage[margin=10pt,font=small,labelfont=bf,labelsep=colon,tableposition=top,
    figureposition=top]{caption}
\usepackage[capposition=top]{floatrow}
\captionsetup{footfont=small}% "footfont" defined by floatrow package
\begin{document}
  \begin{table}[ht]
%     \centering% default with "floatrow"
    \caption{My caption. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
        Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.}
    \begin{tabular}{ll}
      \toprule
      foo & bar \\
      \midrule
      baz & bog \\
      \bottomrule
    \end{tabular}
    \floatfoot{\textbf{Note:} a note Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
        Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.}%
  \end{table}
\end{document}

enter image description here

David Carlisle
  • 757,742
lockstep
  • 250,273
  • This is great stuff. I'm playing with your code now. I was wondering, why do you need to use \captionsetup{footfont=small} rather than setting the footfont parameter in the package declaration with \usepackage[capposition=top,footfont=small]{floatrow}? I've noticed the latter doesn't work (ends up using the default footnotesize for the footfont). Why? Is this a bug? – lowndrul Jan 26 '12 at 17:44
  • 1
    @brianjd According to section 3.1.2 of the floatrow manual, the "\floatfoot macro uses caption package’s mechanism and utilities`". – lockstep Jan 27 '12 at 19:20