↑↑ Home | ↑ TeX tricks |

Given in the order of ascending complexity.

The AMS fonts give us a numer of arrows which come in two lengths, normal and long. For still longer arrows, one can extend them with minus signs or equals signs (for double arrows). Some negative spaces have to be inserted to make the lines join up: (The respective two possibilities are equivalent)

$-\mskip -9mu\longrightarrow$ $-\!\!\!\longrightarrow$ $=\mskip -3mu\Rightarrow$ $=\!\Rightarrow$

For obtaining small greek charaters or symbols in boldface in math mode, define
the macro below. (The usual `\mathbf` won't do in these cases.)

% bold face in formulas \def\mbf#1{\mathchoice{\hbox{\boldmath $\displaystyle #1$}} {\hbox{\boldmath $\textstyle #1$}} {\hbox{\boldmath $\scriptstyle #1$}} {\hbox{\boldmath $\scriptscriptstyle #1$}}}The

The following will increase the spacing between fractions. With the original
LaTeX `\frac`, adjacent fraction bars (eg in a product) are nearly
indiscernible.

% fractions look better as "math inner" \def\frac#1#2{{\mathinner{#1 \over #2}}}

The following code allows to insert graphics into equations and text. They are
centered roughly on the cross bar of the plus sign. The macro's parameter is
the truncated file name (without ".eps"). The size of the image can
be adjusted by changing the parameter `height=...`.

% a box with graphics contered on the text line \def\inlinegraph#1{{\setbox0=\hbox{\includegraphics[height=40mm]{#1.eps}} \dimen0=0.7ex \advance\dimen0 by -0.5\ht0 \raise\dimen0\box0}}

The following macro prints an exclamation mark on top of a bidirectional arrow.

% maths "ought to be equivalent" symbol <=!=> \def\oughttobe{{ \setbox0=\hbox{$\Longleftrightarrow$} \setbox1=\hbox{\scriptsize !} \dimen0=-0.5\wd0 \advance\dimen0 by -0.5\wd1 \hbox{\box0\kern\dimen0\vbox to 0pt {\vss\hbox{\raise 0.7em \box1}}} }}This can be generalised. The following macro puts any small sign under a larger one. (

\def\putunder#1#2{\mathrel{ \setbox0=\hbox{#1}\setbox1=\hbox{\scriptsize #2} \dimen0=-0.5\wd0 \advance\dimen0 by -0.5\wd1 \dimen1=0.5\wd0 \advance\dimen1 by -0.5\wd1 \hbox{\box0\kern\dimen0% \vbox to 0pt {\hbox{\lower 0.7em \box1}\vss}% \kern\dimen1} }}To indicate the limit of an expression when epsilon approaches zero, one could write:

\putunder{$-\!\!\!\longrightarrow$}{$\epsilon\!\to\!0$}The dollar signs have to be there even in math mode.

A unit matrix is customarily denoted by a 1 with a double vertical stroke.
However, I could not find such a symbol anywhere in the AMS or other font
packages. So I wrote a macro for it myself. Two `\rule`s are used to
draw the second stroke and to extend the baseline.

\def\dblone{\hbox{$1\hskip -1.2pt\vrule depth 0pt height 1.6ex width 0.7pt \vrule depth 0pt height 0.3pt width 0.12em$}}