I'm currently writing my thesis using the tufte-book
class, and have been told that captions must go underneath the figures/tables/schemes (I know this goes against the point, but I can't really do anything about that right now, and plan on printing myself a less-ugly version along with the one conforming to the office guidelines).
Using previous questions here, I've been able to define a new environment for pagefigure
which re-defines the figure*
environment, in order to force the caption below the figure (I've also set this up for table etc.).
As a MWE, the code below shows the additional preamble I've added to get this to work.
\documentclass[a4paper,twoside, symmetric,justified,notoc, nobib]{tufte-book}
\RequirePackage{etoolbox}
\makeatletter
\newif\if@tufte@margtab\@tufte@margtabfalse
\AtBeginEnvironment{margintable}{\@tufte@margtabtrue}
\AtEndEnvironment{margintable}{\@tufte@margtabfalse}
\newcommand{\classiccaptionstyle}{%
\long\def\@caption##1[##2]##3{%
\par
\addcontentsline{\csname ext@##1\endcsname}{##1}%
{\protect\numberline{\csname the##1\endcsname}{\ignorespaces ##2}}%
\begingroup
\@parboxrestore
\if@minipage
\@setminipage
\fi
\normalsize
\@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par
\endgroup}
\long\def\@makecaption##1##2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{\@tufte@caption@font##1: ##2}%
\ifdim \wd\@tempboxa >\hsize
\@tufte@caption@font\if@tufte@margtab\@tufte@caption@justification\fi##1: ##2\par
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
% \setcaptionfont{\normalfont}
\let\caption\@tufte@orig@caption%
\let\label\@tufte@orig@label}
\makeatother
\newenvironment{pagefigure}{%
\begin{figure*}[b!]
\classiccaptionstyle
}{\end{figure*}}
\begin{document}
\begin{pagefigure}
\includegraphics[scale=1]{graphics/example.eps}
\caption{A Scheme which should take up the full width of the page }
\end{page figure}
\end{document}
What I now need is to be able to define a 'scheme' in addition to a 'figure' or a table.
I thought I might be able to do this by renewing the figurename to scheme, as below, however this messes up the numbering (Scheme 1.1, figure 1.2 rather than scheme 1.1, figure 1.1...).
\renewcommand\figurename{Scheme}
I've also tried defining a new environment, as below, but again this doesn't give the desired numbering.
\newenvironment{pagescheme}{%
\begin{figure*}[b!]
\renewcommand\figurename{Scheme}
\classiccaptionstyle
}{\end{figure*}}
Any advice on how to do this would be appreciated. Ideally it needs to be by duplicating the pagefigure environment and changing the captioning for anything in that environment. Packages that define a new scheme
environment from scatch lose the tufte floating (i.e. they span into the wrong margin uncontrollably).
I realise the obvious solution to this is to use the chemstyle
package, but for various reasons this isn't compatible with the tufte document class.