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.

I'm using marginfix to fix the positioning of sidenotes in some Tufte documents, but whenever a page contains any text in a fullwidth environment, all marginal material on that page is shifted to the right, so that while it is positioned "correctly" relative to the full width text, it overflows the page and is shifted away from all regular width text:

\documentclass[]{tufte-handout}
\usepackage{marginfix}
\begin{document}
This is text before some full width text. The footnote that goes with it is way over there.\footnote{This note goes with the text before the full width text.}
\begin{fullwidth}This is some full width text. Its presence on a page using \texttt{marginfix} pushes all notes to the right off the page.\end{fullwidth}
This is some other text, after the full width text, and its note is also way over there.\footnote{This note goes with the text after the full width text.}
\end{document}

Is there a way to prevent this behavior when using marginfix, perhaps by patching Tufte or wrapping the fullwidth environment?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

The trick is to use minipage to redefine fullwidth with the correct width value:

\documentclass[]{tufte-handout}

\makeatletter
\newlength{\fullwidthlength}
\AtBeginDocument{\setlength{\fullwidthlength}{\@tufte@fullwidth}}
\makeatother
\renewenvironment{fullwidth}{\noindent\begin{minipage}{\fullwidthlength}\strut}{\strut\end{minipage}}

\usepackage{marginfix}

\begin{document}
This is text before some full width text. The footnote that goes with it is way over there.\footnote{This note goes with the text before the full width text.}

\begin{fullwidth}This is some full width text. Its presence on a page using \texttt{marginfix} pushes all notes to the right off the page.\end{fullwidth}

This is some other text, after the full width text, and its note is also way over there.\footnote{This note goes with the text after the full width text.}

\end{document}
share|improve this answer
    
Thanks to lockstep for providing the correct width value! –  raxacoricofallapatorius Mar 16 '12 at 21:44
add comment

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.