2

I would like to include a full-width figure in a document prepared with the tufte-book class.

I've found that using the floatrow package, along with using the setkeys option of graphicx, breaks the tufte-book figure* float.


MWE

\documentclass{tufte-book}

\usepackage{floatrow}
\usepackage{graphicx}
\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}

\begin{document}

Here is a figure that I would like to be fullwidth.

\begin{figure*}
  \includegraphics{example-image-a}
\end{figure*}

\end{document}

Actual output enter image description here


Desired output enter image description here

5
  • I'm not surprised floatrow is incompatible with tufte, as both redefine the figure and figure* environments. If you comment it out, the MWE works fine. Oct 14, 2020 at 17:17
  • Yes. Although not shown in the MWE, I use floatrow elsewhere to declare a new floating enviornment. Ideally, I'd be able to keep using floatrow to declare my floating environment, but without floatrow impacting tufte's figure*
    – jwalton
    Oct 14, 2020 at 17:20
  • You can use the newfloat and float packages to create new floating environments without changing figure and table (just don't use the package options with float). Oct 14, 2020 at 17:29
  • Thanks, if no other solutions are forthcoming, I will likely resort to this solution.
    – jwalton
    Oct 14, 2020 at 17:34
  • 1
    The newfloat package seems to be adapted to the tufte document class, at least this is what I just found in the dtx file: "If the \class{tufte} document class is loaded, |\@tufte@float| and |\end@tufte@float| will be used instead of |\@float|, |\end@float|, |\@dblfloat|, and |\end@dblfloat|." (But I couldn't find anything about tufte in the newfloat manual.)
    – user205700
    Oct 15, 2020 at 7:46

1 Answer 1

3

It works for me both with pdf latex and lualatex

\documentclass{tufte-book}

\usepackage{floatrow}
\usepackage{graphicx}

\setkeys{Gin}{width=\textwidth+\marginparsep+\marginparwidth,totalheight=\textheight,keepaspectratio}

\usepackage{kantlipsum}

\begin{document}

Here is a figure that I would like to be fullwidth.

\begin{figure*}
\includegraphics{example-image-a}
\end{figure*}

\kant[1]
\end{document}

It does not solve the conflict but is a workaround. The tufte class it is not maintained since 2015.

output

You must log in to answer this question.

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