Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

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

share|improve this answer
    
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? –  raxacoricofallapatorius Mar 16 '12 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 Mar 16 '12 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 Mar 16 '12 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 Mar 16 '12 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 Mar 17 '12 at 20:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.