[texhax] Capturing Display Math Mode

Steve Revilak steve at srevilak.net
Sat Dec 25 16:14:58 CET 2010


>I'm trying to write myself a little calculus reference sheet, and I started with something like this:
>
>=============================================
>Leibniz notation: $${\rm d}f \over {\rm d}x$$
>\bye
>=============================================
>
>The trouble is that the displayed df/dx get placed smack in the center of the page, and it wastes a lot of whitespace on the side. I want to cram all of these calculus notes into just one page, so all of the whitespace which display-math-mode wastes is a big no-no; yet, I still do need the visual style which display-math-mode offers, formatting this whole reference sheet in just in-line horizontal math mode would look awful.

Patrick,

If you're willing to take a LaTeX approach (as opposed to a plain TeX
approach), then you should consider the amsmath package.

amsmath provides many environments for laying out equations, and these
environments give you a lot control over placement and the use of
whitespace.  

Here is a brief example:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\documentclass[fleqn]{article}
\usepackage{amsmath}

\begin{document}

A typically arrangement of equation and annotation.
\begin{align*}
  & \frac{\mathrm{d} f}{\mathrm{d}x} && \text{Leibniz notation (frac)} \\
  & \tfrac{\mathrm{d} f}{\mathrm{d}x} && \text{Leibniz notation (tfrac)}
\end{align*}

If desired, we can swap the ordering
\begin{align*}
  \text{Leibniz notation (frac)} && \frac{\mathrm{d} f}{\mathrm{d}x} \\
  \text{Leibniz notation (tfrac)} && \tfrac{\mathrm{d} f}{\mathrm{d}x}
\end{align*}

or, condense to a single line.
\begin{align*}
\frac{\mathrm{d} f}{\mathrm{d}x} && \text{Leibniz notation (frac)}
  && \tfrac{\mathrm{d} f}{\mathrm{d}x} && \text{Leibniz notation (tfrac)}
\end{align*}

\end{document}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://tug.org/pipermail/texhax/attachments/20101225/95e99d3e/attachment.bin>


More information about the texhax mailing list