2

In Tufte-LaTeX, I'd like to manually create a full-width environment using minipage rather than the package's fullwidth environment.

What width value should I supply to minipage to match that of the Tufte fullwidth environment's width?

\documentclass{tufte-handout}

\usepackage{lipsum}

\begin{document}
\lipsum[1]

\begin{minipage}{<width>}
    \lipsum[2]
\end{minipage} 

% The value for <width> above should make that paragraph identical this one
%\begin{fullwidth}
%     \lipsum[2]
%\end{fullwidth}

\lipsum*[3]

\end{document}

FWIW, I plan to use this primarily to create a full-width title block, if that matters for details of indentation and positoning.

0

1 Answer 1

7

The length you are looking for is \@tufte@fullwidth. (Note: I'm assuming that you don't want to indent your minipage, therefore I added \noindent before it.)

\documentclass{tufte-handout}

\makeatletter
\newlength{\fullwidthlength}
\AtBeginDocument{\setlength{\fullwidthlength}{\@tufte@fullwidth}}
\makeatother

\usepackage{lipsum}

\begin{document}
\lipsum[1]

\noindent
\begin{minipage}{\fullwidthlength}
    \lipsum[2]
\end{minipage} 

% The value for <width> above should make that paragraph identical this one
\begin{fullwidth}
     \lipsum[2]
\end{fullwidth}

\lipsum*[3]

\end{document}

enter image description here

11
  • Excellent! What's the reason for the \AtBeginDocument (I notice from experimenting that it is essential). Also, apparently I can't have an @ in a length?
    – orome
    Commented Mar 16, 2012 at 20:43
  • 1
    @lockstep has it exactly right. The \@tufte@fullwidth length isn't set until the document starts so that it can account for any customizations you make to the margins or paper size. You can use \@tufte@fullwidth directly in your document, but you'd need to surround it by \makeatletter and \makeatother.
    – godbyk
    Commented Mar 16, 2012 at 21:07
  • 2
    @raxacoricofallapatorius: To fix the spacing, try adding a \strut to the beginning and end of your minipage contents. (Since \lipsum ends with \par, it'll insert a paragraph break and you'll get a blank line in the example, but this shouldn't be an issue in regular text.)
    – godbyk
    Commented Mar 16, 2012 at 21:13
  • 1
    @raxacoricofallapatorius: If you're referring to the spacing after the regular fullwidth environment, then you can add \unskip\par immediately following \end{fullwidth} to bring it back in line. See this example document.
    – godbyk
    Commented Mar 16, 2012 at 21:49
  • 1
    @raxacoricofallapatorius: Ah, I understand. I'll look into getting the fullwidth environment to have the proper spacing. It was originally designed solely to allow us to have figure* and table* environments.
    – godbyk
    Commented Mar 17, 2012 at 20:51

You must log in to answer this question.

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