1

How can I achieve a full-width math environment in a Tufte-style document which is vertically spaced correctly, in the sense shown?

Consider the screenshot below. Notice how the vertical spacing on the ‘Textwidth’ align* environments respects whether it is mid-paragraph or at the start of one. I want to achieve this behaviour (or just get rid of the new-paragraph vertical skip) with a full-width align*, but it seems the fullwidth environment contains its own separate paragraph. Can this be corrected?

enter image description here

\documentclass{caesar_book}

\begin{document}

Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
\begin{align*}
    \text{(Textwidth, same paragraph) } 1 + 2 + 3 + 4 + 5
\end{align*}
Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

\begin{align*}
    \text{(Textwidth, new paragraph) } 1 + 2 + 3 + 4 + 5
\end{align*}
Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
\begin{fullwidth}
    \begin{align*}
        \text{(Fullwidth, same paragraph) } 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10
    \end{align*}
\end{fullwidth}
Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

\begin{fullwidth}
    \begin{align*}
        \text{(Fullwidth, new paragraph) } 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10
    \end{align*}
\end{fullwidth}
Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

\end{document}
3
  • fullwidth is just the adjustwidth from changepage which in turn is a list constuction. Try wrapping align in \begin{list}{}{} ... \end{list} and you'll get the same result. I don't know if there is a good solution to this. If this is only for wrapping align, then I'd make a new env (fullwidthalign) and then backtrack the spacing there.
    – daleif
    Sep 30, 2021 at 7:27
  • @daleif Good idea. Any idea why \begin{fullwidth} \vspace{-\parskip} \begin{align} … doesn’t do the trick? I hacky solution would be to hardcode an eyeballed length, but I’d like to fix this nicely.
    – Jollywatt
    Sep 30, 2021 at 7:49
  • Try \vskip-\baselineskip
    – daleif
    Sep 30, 2021 at 7:59

1 Answer 1

1

To eliminate the extra vertical space in both uses of fullwidth, it is necessary to define a new environment --similar to fullwidth-- to be be used when align* is included.

Of course, if you want to simulate the behavior when fullwidth is not used, use it only the first time (same paragraph).

c

\documentclass{caesar_book}

\newenvironment{fullwidthx} % added<<<<<<<<<<<<
{\ifthenelse{\boolean{@twoside}}%
    {\begin{adjustwidth*}{}{-\overhang}\vskip-\baselineskip}% <<<<<<<<<
        {\begin{adjustwidth}{}{-\overhang}\vskip-\baselineskip}% <<<<<<<<<<
        }%
        {\ifthenelse{\boolean{@twoside}}%
            {\end{adjustwidth*}}%
        {\end{adjustwidth}}%
}

\begin{document}
    
    Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
    \begin{align*}
        \text{(Textwidth, same paragraph) } 1 + 2 + 3 + 4 + 5
    \end{align*}
    Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
    
    \begin{align*}
        \text{(Textwidth, new paragraph) } 1 + 2 + 3 + 4 + 5
    \end{align*}
    Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
    \begin{fullwidthx} %<<<<<<<<<<<<<<<<<<<<<
        \begin{align*}
            \text{(Fullwidthx, same paragraph) } 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10
        \end{align*}
    \end{fullwidthx}
    Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
    
    \begin{fullwidthx} %<<<<<<<<<<<<<<<<<<<<<<<
        \begin{align*}
            \text{(Fullwidthx, new paragraph) } 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10
        \end{align*}
    \end{fullwidthx}
    Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
    
\end{document}
1
  • Thanks. The \vspace-\baselineskip command is the most helpful point. Since, in practice, I would never start a paragraph with a fullwidth align, it’s appropriate for me to define a fullwidthalign environment which is permanently -\baselineskiped. So even though this doesn’t strictly solve the question, I’ll mark this as accepted.
    – Jollywatt
    Oct 1, 2021 at 21:36

You must log in to answer this question.

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