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 all captions etc. are in the side margin. I want to put the equation numbers there as well. Is it possible to do this?

share|improve this question

1 Answer 1

up vote 7 down vote accepted
\documentclass{tufte-book}

\def\a{One two three. }
\def\b{\a Five. \a Six seven eight. \a \a}
\def\c{\b\b\b\b}

\usepackage{amsmath} 

\makeatletter

\let\orig@maketag@@@\maketag@@@
\renewcommand{\eqref}[1]{\textup{\let\maketag@@@\orig@maketag@@@\tagform@{\ref{#1}}}}

\def\maketag@@@#1{\hbox{\rlap{\kern\marginparsep\m@th\normalfont#1}\kern1sp}}
\makeatother

\begin{document}


\b\b\b\marginpar{aaa}\b\b

\begin{figure}[h]
zzz
\caption{zz zz zz}
\end{figure}

bbb
\begin{equation}\label{eq:myequation}
    f(x)=x^2
\end{equation}
Test reference: \eqref{eq:myequation}

\c

\end{document}

enter image description here

The only tricky bit is the \kern1sp as a zero width tag seems to throw amsmath of course and it moves the number down as if there were not room for it on the line.

See also

Changing the apperance of equation numbers with amsmath

share|improve this answer
    
That's exactly what I want! The only thing you need to take care of by hand: marginnotes that are "too" long and cover the equation number. –  Stefan Aug 6 '12 at 11:52
    
Well that's harder to fix. You could make the equation numbers marginotes but then they would drift away from the equations. I do have an old half finished answer to a question on this site that implements a margin note mechanism that would allow equations to "block" parts of the margin area, but it involves re-writing large swathes of latex internals and doesn't work, so I don't recommend it:-) –  David Carlisle Aug 6 '12 at 13:07

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.