Intereting Posts

How to clip an external image inside an ellipse
Tabbing for math mode?
Typesetting non-scientific material for the first time
Remove indent of paragraph and add line skip with tufte-latex
Subfloat under each other
Why does manually loading hyperref change the font size for captions in Tufte documents?
Beamer: Vertical alignment of multi-column ToC
Can a table consist only of an image, e.g. a .pdf?
How to use table in mdframed?
Can I draw figure 3 y axis using pgfplot?
Double square braces like these ⟦exp⟧?
Extract multiplier from siunitx prefix
Stripping off non-alpha characters before calling \csname … \endcsname
What is the difference between the combination of split inside equation* and align*?
Aligning the right parts in multiple \begin{cases}

I’ve recently started using `tufte-book`

for typesetting solutions to math problems. I like it very much that you’re encouraged to use the margin, which is very nice for giving hints, pointers and references concerning the steps of finding a solution.

Unfortunately, the `sidenote`

and `marginnote`

commands don’t work in math environments *(not in outer par mode)*. Most of the time, I’m able to work around it by putting the commands after the environment, using the optional offset with a decimal value via `\marginnote[-length]{content}`

. But this breaks when a math environment is pushed to the end of a page: the notes are then pushed to the next page, no longer appearing on the same page. This also happens if you first put the commands and then the environment.

So, is there any way to enable `sidenote`

and `marginnote`

in math environments?

(I thought of using the `samepage`

environment, but this adds a lot of ugly whitespace, as the whole math environment is pushed to the next page without necessity)

- What is the difference between \ldots and \cdots?
- What is the advantage of using the equation environment in latex?
- Control the alignment of each “cell” in amsmath's aligned environment
- mathtools vs amsmath
- How are big operators defined?
- A MiKTeX update removed amsmath as obsolete – can I use another package or get it back?

```
\documentclass{tufte-book}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage{tikz}
\newcommand{\filler}[1][10]%
{ \foreach \x in {1,...,#1}
{ test
}
}
\begin{document}
\lipsum[1]
\begin{align*}
&\int\int\int t\ dt^3\\
=&\int\int \frac{t^2}{2}\ dt^2\\
=&\int \frac{t^3}{6}\ dt\\
=&\frac{t^4}{24}
\end{align*}\marginnote[-3.7cm]{first note}\marginnote[-1.7cm]{second note}
\lipsum[2]
\filler[50]
\begin{align*}
&\int\int\int t\ dt^3\\
=&\int\int \frac{t^2}{2}\ dt^2\\
=&\int \frac{t^3}{6}\ dt\\
=&\frac{t^4}{24}
\end{align*}\marginnote[-3.7cm]{first note}\marginnote[-1.7cm]{second note}
\end{document}
```

As you can see, the second `align*`

is still on the first page, but the `marginnote`

s are pushed to the second page.

- How can I make LaTeX ignore certain math symbols in math mode?
- inverted breve accent in math mode
- Different \mathcal O
- Math inside tables and formatting
- Can one use \XeTeXinterchartoks in math mode?
- Should I \mathrm the d in my integrals?
- Capital cursive E in math mode?
- What are all the font styles I can use in math mode?
- Using LaTeX to render hypergeometric function notation
- How to put a hat on a binary operator and maintain spacing

The AMS environments conveniently give you a hook to place text at a known position relative to the margin so I’d do

```
\documentclass{tufte-book}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage{tikz}
\newcommand{\filler}[1][10]%
{ \foreach \x in {1,...,#1}
{ test
}
}
\def\mathnote#1{%
\tag*{\rlap{\hspace\marginparsep\smash{\parbox[t]{\marginparwidth}{%
\footnotesize#1}}}}
}
\begin{document}
\lipsum[1]
\begin{align*}
&\int\int\int t\ dt^3\\
=&\int\int \frac{t^2}{2}\ dt^2\\
=&\int \frac{t^3}{6}\ dt\\
=&\frac{t^4}{24}
\end{align*}\marginnote[-3.7cm]{first note}\marginnote[-1.7cm]{second note}
\lipsum[2]
\filler[50]
\begin{align*}
&\int\int\int t\ dt^3\mathnote{first note}\\
=&\int\int \frac{t^2}{2}\ dt^2\\
=&\int \frac{t^3}{6}\ dt\\
=&\frac{t^4}{24}\mathnote{second note}
\end{align*}
\end{document}
```

- Crossing bonds in chemfig
- Creating thicker Tikz mindmap connectors
- Spacing issue for newenvironment wrapper of equation environment
- pdfLaTeX hangs with no errors
- Syntax of let with and without =
- Why does CTAN now look like I'm on LSD?
- Is there a LaTeX editor supporting Subversion out of the box?
- Rotated paraboloid/square root in pgf/TikZ
- How to draw a rectangle filled with random size circular pattern?
- Making a square centered at a point in TikZ
- How do I center the table of contents title using tocloft?
- Overfull hbox in biblatex
- Updated AMA.bst file?
- Move periods inside quotes in bibliography
- Having a table in an enumerate environment