diff --git a/sample-book.pdf b/sample-book.pdf index f6d2189..5ec62f8 100644 Binary files a/sample-book.pdf and b/sample-book.pdf differ diff --git a/sample-book.tex b/sample-book.tex index 8836f8b..444fd0f 100644 --- a/sample-book.tex +++ b/sample-book.tex @@ -599,12 +599,34 @@ environment and figure~\ref{fig:textfig} is an example of the normal \begin{figure} \includegraphics{hilbertcurves.pdf} % \checkparity This is an \pageparity\ page.% - \caption{Hilbert curves of various degrees $n$. - \emph{Notice that this figure only takes up the main textblock width.}} + \caption[Hilbert curves of various degrees $n$.][6pt]{Hilbert curves of various degrees $n$. \emph{Notice that this figure only takes up the main textblock width.}} \label{fig:textfig} %\zsavepos{pos:textfig} \end{figure} +As with sidenotes and marginnotes, a caption may sometimes require vertical +adjustment. The \hlred{\doccmd{caption}} command now takes a second optional +argument that enables you to do this by providing a dimension \docopt{offset}. +You may specify the caption in any one of the following forms: +\begin{docspec} + \doccmd{caption}\{\docarg{long caption}\}\\ + \doccmd{caption}[\docarg{short caption}]\{\docarg{long caption}\}\\ + \doccmd{caption}[][\docopt{offset}]\{\docarg{long caption}\}\\ + \doccmd{caption}[\docarg{short caption}][\docopt{offset}]% + \{\docarg{long caption}\} +\end{docspec} +A positive \docopt{offset} will push the caption down the page. The short +caption, if provided, is what appears in the list of figures/tables, otherwise +the ``long'' caption appears there. Note that although the arguments +\docopt{short caption} and \docopt{offset} are both optional, they must be +provided in order. Thus, to specify an \docopt{offset} without specifying a +\docopt{short caption}, you must include the first set of empty brackets +\Verb|[]|, which tell \doccmd{caption} to use the default ``long'' caption. As +an example, the caption to figure~\ref{fig:textfig} above was given in the form +\begin{docspec} + \doccmd{caption}[Hilbert curves...][6pt]\{Hilbert curves...\} +\end{docspec} + Table~\ref{tab:normaltab} shows table created with the \docpkg{booktabs} package. Notice the lack of vertical rules---they serve only to clutter the table's data. diff --git a/sample-handout.pdf b/sample-handout.pdf index aab9deb..eea8b26 100644 Binary files a/sample-handout.pdf and b/sample-handout.pdf differ diff --git a/tufte-book.cls b/tufte-book.cls index b0ee6a0..1469cc7 100644 --- a/tufte-book.cls +++ b/tufte-book.cls @@ -71,7 +71,8 @@ % If there is a `tufte-book-local.sty' file, load it. \IfFileExists{tufte-book-local.tex} - {\input{tufte-book-local}} + {\input{tufte-book-local} + \ClassInfo{\@tufte@pkgname}{Loading tufte-book-local.tex}} {} %% diff --git a/tufte-common.def b/tufte-common.def index ab05cc0..7186b51 100644 --- a/tufte-common.def +++ b/tufte-common.def @@ -1043,7 +1043,7 @@ \ifthenelse{\isempty{#1}}% {\gdef\@tufte@stored@shortcaption{#3}}% {\gdef\@tufte@stored@shortcaption{#1}}% - \gdef\@tufte@caption@vertical@offset{-#2}% we want positive push to lower captions + \gdef\@tufte@caption@vertical@offset{-#2}% we want a positive offset to lower captions \gdef\@tufte@stored@caption{#3}% } @@ -1113,7 +1113,7 @@ \begin{lrbox}{\@tufte@caption@box}\hbox{}\end{lrbox}% \gdef\@tufte@stored@shortcaption{}% \gdef\@tufte@stored@caption{}% - \gdef\@tufte@caption@vertical@offset{0pt}% reset caption push + \gdef\@tufte@caption@vertical@offset{0pt}% reset caption offset } \newcommand{\@tufte@float@textwidth}[3][0pt]{% @@ -1633,7 +1633,8 @@ % If there is a `tufte-common-local.tex' file, load it up. \IfFileExists{tufte-common-local.tex} - {\input{tufte-common-local.tex}} + {\input{tufte-common-local.tex}% + \ClassInfo{\@tufte@pkgname}{Loading tufte-common-local.tex}} {} diff --git a/tufte-handout.cls b/tufte-handout.cls index e130993..f4ec2a2 100644 --- a/tufte-handout.cls +++ b/tufte-handout.cls @@ -29,7 +29,8 @@ % If there is a `tufte-handout-local.tex' file, load it. \IfFileExists{tufte-handout-local.tex} - {\input{tufte-handout-local}} + {\input{tufte-handout-local} + \ClassInfo{\@tufte@pkgname}{Loading tufte-handout-local.tex}} {}