m i m e T e X   m a n u a l
( for mimeTeX version 1.60 )
Click for:  LaTeX tutorial
mimeTeX QuickStart


Copyright © 2002-2005, John Forkosh Associates, Inc.
email: john@forkosh.com

C o n t e n t s     (Edited for SCF)
- - - T u t o r i a l - - -
  (I) Introduction  
a. Quick Start
b. Examples
 - - - R e f e r e n c e - - -
  (II) Syntax Reference  
a. Math & White Space
b. Symbols, Sizes, Modes
c. Delimiters
d. Accents, Arrows, etc.
e. \begin{array}
f. \picture( ){ }
g. Other Commands
h. Other Exceptions


[tex] .... [/tex]

Double click on any formula
to see it in the demo box

(I) Introduction

(Ia) Quick Start  

MimeTeX is as TeX-like as possible (though not 100% compliant), and you must already be familiar with LaTeX math markup to use it. If you're not, many online LaTeX turorials are readily available. You may also want to browse Andrew Roberts' Latex Math I and Latex Math II, or my own LaTeX math tutorial. Then, instead of continuing to read this page, you can just Submit any LaTeX math expression you like in the Query Box below. I've started you out with a little example already in the box, or you can Click any of the Examples below to place that corresponding expression in the Query Box.

Meanwhile, here are just a few quickstart tips for Submitting your own mimeTeX expressions in the Query Box below:

Now enter your own LaTeX expression, use the sample provided, or Click any of the Examples. Then press the Submit button, and mimeTeX's rendering should be displayed in the little window immediately below it. This is how whatever is included between [tex]  [/tex] in your post will be rendered.

First enter your own LaTeX expression, or Click any example...

Now click Submit to see it rendered below...

You should see   if you submit the sample expression already in the box.

And the [tex]....[/tex] tag to embed this same integral anywhere in your posts.

(Ib) Examples  

Here are various additional random examples further demonstrating mimeTeX's features and usage. To see how they're done, Click any one of them to place its corresponding expression in the Query Box above. Then press Submit to re-render it, or you can edit the expression first to suit your own purposes.

solution for quadratic

definition of derivative
(5) illustrating \frac{}{} for continued fraction
(6) illustrating \left\{...\right.
and note the accents
(7) \overbrace{}^{} and \underbrace{}_{}
(TeXbook page 181, Exercise 18.41)

demonstrating \begin{array}'s dashed lines
(9) Block diagonal form using nested \begin{array}'s.
Also, note rows aligned across all three arrays.
(10) using \begin{eqnarray} to align equations
(11) commutative diagram using \begin{array}
(12) mimeTeX \picture(size){pic_elems} "environment", illustrating the image charge - q for a grounded conducting sphere of radius a with a charge q at distance r > a outside it.
(13) \picture "environment" illustrating the surface polarization charge induced by a uniform electric field. Inside the slab of material, the volume polarization charge clearly vanishes.

The little \small\unitlength{.75} \pict(40,20){(20,10) {\circle(40,20)}(c10,10)+(c30,10)-}" alt="" border=0 align=middle> dipole image is drawn only once, then multiput across two columns, and then that result is further multiput down the rows. MimeTeX \picture's can be used as picture elements in other pictures, nested to any level. The image at left is picture-in-picture-in-picture.

Some font examples ...

Finally, illustrated below are some examples of fonts and symbols available with mimeTeX. All symbols and sizes from cmr, cmmi, cmmib (use \mathbf{ }), cmsy, cmex, bbold (use \mathbb{ }), rsfs (use \mathscr{ }), and stmary should be available, but they're not all shown. And also not shown are various "constructed symbols" like \sqrt, accents, etc. The illustrated font sizes are numbered 4=\Large, 3=\large and 2=\normalsize (not shown are 7=\Huge, 6=\huge, 5=\LARGE, 1=\small and 0=\tiny).

(Ic) GPL License  

"My grandfather once told me there are two kinds of people:
    Those who do the work and those who take the credit.
    He told me to try to be in the first group; there was much less competition.
Indira Gandhi, the late Prime Minister of India

MimeTeX's copyright is registered by me with the US Copyright Office, and I hereby license it to you under the terms and conditions of the GPL. There is no official support of any kind whatsoever, and you use mimeTeX entirely at your own risk, with no guarantee of any kind, in particular with no warranty of merchantability.

By using mimeTeX, you warrant that you have read, understood and agreed to these terms and conditions, and that you possess the legal right and ability to enter into this agreement and to use mimeTeX in accordance with it.

Hopefully, the law and ethics regarding computer programs will evolve to make this kind of obnoxious banter unnecessary. In the meantime, please forgive me my paranoia.

To protect your own intellectual property, I recommend Copyright Basics from The Library of Congress, and similarly, Copyright Basics from The American Bar Association. Very briefly, download Form TX and follow the included instructions. In principle, you automatically own the copyright to anything you write the moment it's on paper. In practice, if the matter comes under dispute, the courts look _very_ favorably on you for demonstrating your intent by registering the copyright.

(II) Syntax Reference  

Since mimeTeX's syntax is as TeX-like as possible, we'll mostly discuss the occasional differences. This section contains short paragraphs that each discuss some aspect of mimeTeX where your LaTeX experience might not be precisely duplicated.

Anything not discussed here that still doesn't behave like you expect is probably just not implemented. That includes (La)TeX packages (though a few ams commands like \begin{gather} and \begin{pmatrix} are recognized), non-standard fonts, etc. You can try out any questionable syntax by Submitting a query to quickly see whether or not it works. And you might want to occasionally re-browse the Examples above, which may better illustrate implemented features.

(IIa) \unitlength{ }, Math Spaces and Whitespace  


Lengths in mimeTeX are all ultimately expressed in number of pixels. Various commands discussed below require length arguments, including

(the \longxxxarrow [ ]-arguments are optional mimeTeX extensions to LaTeX)   MimeTeX's length-type arguments never take units, e.g., {10pt} and {1cm} are both invalid. Lengths always refer to number of pixels, optionally scaled by a user-specified \unitlength.

MimeTeX's \unitlength{ } command lets you specify the number of pixels per "length unit", e.g., \unitlength{10} \hspace{2.5} renders a 25-pixel space. Both \unitlength{ } and \hspace{ }'s length arguments may be integers or may contain decimal points. Ditto for all other mimeTeX commands that take length arguments. The default \unitlength is, you guessed it, 1.

A specified \unitlength applies to all subsequent terms, i.e., everything to its right. And several \unitlength's may be specified in the same expression, each one overriding those to its left. But if one or more \unitlength's appear within a { }-enclosed subexpression, then terms following its closing right } revert to the \unitlength in effect before its opening left {. For example,

A\hspace{10} {\unitlength{2.5}B\hspace{10}C} \hspace{10}D   produces  

which has a 10-pixel space between A and B, then 25 pixels between B and C, and finally another 10 pixels between C and D.

Math Spaces...

Except inside text boxes, unescaped blanks, tildes (a ~), and all other usual whitespace characters are completely ignored by mimeTeX, just like they are in LaTeX math mode. As usual, you must explicitly write one of the recognized math spaces to put extra visible space in your rendered expressions.

MimeTeX recognizes math spaces \, \: \; as well as \/ and \quad and \qquad . You may also write \hspace{10} to insert a 10-pixel (or any other number) space, scaled by any preceding \unitlength, as illustrated just above. There are no negative spaces.

Although some browsers occasionally misinterpret typed blank spaces inside html query_string's, mimeTeX also recognizes escaped blanks \small\backsl\raise{-5}{\rotate{-90}]}" alt="" border=0 align=middle> (a \ followed by a blank) as math spaces, just in case you can safely use them.

MimeTeX also supports \hfill{textwidth}, where textwidth is roughly equivalent to LaTeX's \textwidth, i.e., it's the total number of pixels, scaled by \unitlength, that your entire rendered expression will span. However, if \hfill{ } appears within a { }-enclosed subexpression, then it applies only to that subexpression. For example,

{abc \hfill{50} def} \hfill{100} ghi     produces    

The first/inner \hfill{50} inserts exactly enough whitespace so that subexpression "abc  def" spans 50 pixels. Then the second/outer \hfill{100} inserts exactly enough whitespace so that the entire expression spans 100 pixels. Without explicit { }-nesting, mimeTeX evaluates expressions left-to-right (sinistrally), e.g., ...\hfill{100}...\hfill{50}... is exactly equivalent to ...\hfill{100}{...\hfill{50}...}. Notice that, this time, the second/right textwidth argument is necessarily smaller than the first/left.

Finally, mimeTeX begins a new line whenever you write \\ . And you may optionally write \\[10] to put a 10-pixel (or any other number) vertical space, scaled by \unitlength, between lines. \begin{eqnarray} also splits long equations over several lines, as illustrated by Example 10 above. But when that's not the best solution, you can also write, for example,

y=a+b+c+d\\\hspace{50}+e+f+g+h     to produce    

However, mimeTeX can't correctly handle automatically-sized delimiters across linebreaks, e.g.,

y=\left\{a+b+c+d\\\hspace{50}+e+f+g+h\right\}     produces    
whereas you probably wanted        

which I produced using \big{...\\...\big} instead of \left\{...\\...\right\}. Expressions of the form \left...\right \\ \left...\right should all be rendered properly. It's only \left...\\...\right that will look odd.

(IIb) Math Symbols, Sizes, and Modes  

Character Sets...

For complete information about the characters and math symbols available in mimeTeX, you'll need to browse through the bottom 500-or-so lines of mimetex.h. And several additional symbols like \ldots and \AA and \hbar are defined by the mimeTeX preprocessor, function mimeprep( ) in mimetex.c     Generally speaking, I've tried to encode the cmr10, cmmi10, cmmib10, cmsy10, cmex10, bbold10, rsfs10, and stmary10 families with "names", e.g., \alpha \beta \forall \sqcup, etc, identical to your LaTeX expectations. For example, the calligraphic symbols in cmsy10 are accessed by writing \mathcal{A} \mathcal{B} \mathcal{XYZ}. Similarly, write \mathbf{A} for the cmmib fonts, write \mathscr{A} for rsfs10, and write \mathbb{R} for bbold10. And see stmaryrd.dvi or stmaryrd.sty, supplied with most LaTeX distributions, for the names of the stmary10 symbols.

I haven't exhaustively checked all the name-number matchings for the hundreds of symbols in mimetex.h. You can eaily correct any minor mistake you find in what I hope is an obvious manner.

In addition to extra LaTeX symbols like \ldots, \AA and \hbar, mentioned above, the mimeTeX preprocessor mimeprep( ) also recognizes various html special characters like <, >,  , ", &, etc. Some web tools apparently translate characters like, e.g., > to >, even inside quoted query_string's, so mimeTeX's preprocessor translates them back to LaTeX symbols for you.

Font Sizes...

MimeTeX currently has eight font sizes, numbered 0-7, with default 3. This font size numbering corresponds to the usual LaTeX directives   \tiny,   \small,   \normalsize,   \large (default),   \Large,   \LARGE,   \huge and \Huge. These directives can be placed anywhere in a mimeTeX expression, and they change font size from that point forwards. However, as usual, a font size change inside a { }-subexpression remains in effect only within that subexpression.

In mimeTeX you may also write \fontsize{0}...\fontsize{7} or the shorter \fs{0},...,\fs{7} for \tiny,...,\Huge. And since these arguments are all single digits, the even shorter form \fs0,...,\fs7 works equally well. For example,

0:   \tiny f(x)=x^2">   produces...
1:   \fs1 f(x)=x^2">
2:   \normalsize f(x)=x^2">
3:   f(x)=x^2">
4\Large f(x)=x^2">
5:   \fs5 f(x)=x^2">
6:   \huge f(x)=x^2">
7:   \fs7 f(x)=x^2">

rendering f(x)=x^2 in mimeTeX font sizes   0 (\tiny or \fs0),   1 (\small or \fs1),   2 (\normalsize or \fs2),   3 (default \large),   4 (\Large or \fs4),   5 (\LARGE or \fs5),   6 (\huge or \fs6)   and   7 (\Huge or \fs7).

You'll soon notice that exponents and \frac's and \atop's are automatically rendered one size smaller than their base expressions. For example,

\Large y=e^{x^2}   produces  

rendering the "y=e" in font size 4 (\Large), the "x" in font size 3 (\large), and the "2" in font size 2 (\normalsize). If you get below font size 0, the font size remains 0.

Explicit size declarations override mimeTeX's default sizing behavior. You can rewrite the preceding example as, say,

\Large y=e^{\normalsize x^{\tiny2}}   which now produces  

rendering the "y=e" in font size 4 (\Large unchanged), the "x" in font size 2 (\normalsize), and the "2" in font size 0 (\tiny).

Preceding an \fs{ } size argument with + or - specifies "relative" sizing. For example, \large\text{abc{\fs{-2}def}ghi} produces , rendering the "def" in font size 1 (two sizes smaller than \large). Note that \fs{-2} affects only the subexpression in which it appears, and that its braces are no longer optional since -2 contains two characters. For exponents (or any other size-changing commands like \frac),

\Large y=e^{\fs{-1}x^2}   produces  

rendering the "y=e" in font size 4 (\Large), as usual. The "x" would usually be rendered one size smaller, in font size 3, and your \fs{-1} is applied to that, resulting in font size 2. And the final "2" is rendered, by the usual rules, one size smaller than the "x", in font size 1.


MimeTeX is always in a math-like mode, so you needn't surround expressions with $...$'s for \textstyle, or $$...$$'s for \displaystyle. By default, operator limits like \int_a^b are rendered \textstyle at font sizes \normalsize and smaller, and rendered \displaystyle at font sizes \large and larger (see the -DDISPLAYSIZE compile option to change this default). And when \displaystyle is invoked (either implicitly at font size \large or larger, or if you explicitly write \displaystyle at any font size), then operators \int, \sum, \prod, etc, are automatically promoted to larger sizes. For example,

\normalsize \sum_{i=1}^ni=\frac{n(n+1)}2     produces     ,   whereas
\displaystyle \normalsize \sum_{i=1}^ni=\frac{n(n+1)}2  produces  ,


\large \sum_{i=1}^ni=\frac{n(n+1)}2   produces   ,   whereas
\textstyle \large \sum_{i=1}^ni=\frac{n(n+1)}2     produces     .

As usual, \nolimits turns displaystyle off (or textstyle on) for the operator immediately preceding it. For example,

\large \sum\nolimits_{i=1}^ni=\frac{n(n+1)}2   produces  

and likewise, \limits turns displaystyle on for the operator immediately preceding it. For example,

\normalsize \sum\limits_{i=1}^ni=\frac{n(n+1)}2   produces  

By the way, \limits affects _any_ character or subexpression immediately preceding it. For example,

A^i_j   produces       as usual, whereas
A\limits^i_j   produces     instead.

Likewise, for subexpressions,

\widehat{xyz}\limits^a   produces  

This side effect may occasionally be useful. For example,

x\rightarrow\limits^gy   produces  

(mimeTeX automatically centers super/subscripts above/below the long and Long arrow forms)

The \displaystyle command turns on displaystyle math mode for the entire expression (or { }-enclosed subexpression), affecting _all_ super/subscripts to the right of the \displaystyle, except for character classes Ordinary and Variable (TeXbook page 154). Similarly, \textstyle turns off displaystyle math mode. For example,

\sum_1^n {\displaystyle\sum_1^k\sum_1^lx_i^j} \sum_1^m   produces  

Note that \sum's within the subexpression are all affected by the beginning \displaystyle, but not the Variable x_i^j. An explicit x\limits_i^j always affects any preceding term.

text boxes...

Finally, mimeTeX also has a text-like/roman mode entered by writing either \text{anything at all} or the equivalent LaTeX-2.09-like command {\rm anything at all}, both of which render anything at all in roman (font family cmr10). \mbox{ } and several similar LaTeX commands are recognized by mimeTeX as synonyms for \text{ }. For italic, write \textit{anything at all} or {\it anything at all}, both of which render anything at all in italic (font family cmmi10). All four forms respect spaces between words, except that the first/required space after {\rm etc} and {\it etc} is still ignored. For example,

anything at all   just produces       whereas

\text{anything at all}   produces       and

\textit{anything at all}   produces       instead.

(IIc) Delimiters  

Parentheses and Braces (delimiters)...

LaTeX's \left( ... \right) and the other 21 standard LaTeX delimiters are also recognized by mimeTeX. And mimeTeX also recognizes an etex-like \middle.   Several of the most common automatically sized delimiters are illustrated below...

Delimiter example... ...renders
\left( ... \right) \left( \frac1{1-x^2} \right)^2
\left[ ... \right] \left[ \frac1{\sqrt2}x - y \right]^n
\left\{ ... \right\} \left\{ 1^2,2^2,3^2,\ldots \right\}
\left\langle   ...
        ...  \right\rangle
\left\langle \varphi \middle| \hat H
        \middle| \phi \right\rangle
\left| ... \right| \left| \begin{matrix} a_1 & a_2 \\
      a_3 & a_4 \end{matrix} \right|
\left\| ... \right\| \left\|x^2-y^2\right\|
\left\{ ...  \right. y=\left\{ \text{this\\that} \right.
\left.  ... \right\} \left. \text{this\\that} \right\}=y


  1. Size declarations inside any of the above delimiter pairs affect only the enclosed subexpression, e.g., \Large w=\left(\small x+y\right)+z produces
  2. An expression may contain as many etex-like \middle's as you like, and in mimeTeX the surrounding \left...\right isn't required. When omitted, the scope of \middle is either the entire expression or the   { }-enclosed subexpression in which the \middle's occur. For example,   \frac{a+1}b \middle/ \middle(\frac{c+1}d \middle/ \frac{e+1}f\middle)   renders   \large \frac{a+1}b\middle/\middle(\frac{c+1}d\middle/\frac{e+1}f\middle)" border=0 align=middle>.
  3. In the last two examples, note that mimeTeX recognizes the   \\   in   \text{this\\that}   as a linebreak. For example, x=1\\y=2\\z=3 renders  

Besides the \left...\right delimiters discussed above, mimeTeX also supports constructions like \left\int_a^b...\right. , which automatically sizes the \left\int to accommodate everything between it and its matching \right.   delimiter. The \right delimiter needn't necessarily be the \right.   illustrated, e.g., \left\int_a^b x^2dx =\frac{x^3}3\right|_a^b produces . You can also write \left\sum, \left\prod, \left\cup, etc, for many of the symbols in CMEX10. And any symbol that works with \left will also work with \right .

Unescaped ( )'s and [ ]'s and | |'s and < >'s don't need to be balanced since mimeTeX just displays them like ordinary characters without any special significance. Ditto for the usual four \big( and \Big( and \bigg( and \Bigg(, and for their four right ) counterparts, which just display (...)'s at fixed larger sizes, and also have no special significance. All four big [ ]'s and < >'s and { }'s are also available as ordinary characters.

As usual, unescaped {...}'s aren't displayed at all, must be balanced, and have the usual special LaTeX significance. MimeTeX interprets escaped \{...\}'s as abbreviations for \left\{...\right\} and therefore always sizes them to fit. If you need displayed but unsized {...}'s, write \lbrace...\rbrace or any of the four \big{...\big}'s.

(IId) Accents, Functions, Arrows, Raise and rotate, Compose, Abbreviations, etc.  


\vec{ } \hat{ } \bar{ } \tilde{ } \dot{ } \ddot{ }   and   \acute{ } \grave{ } \breve{ } \check{ } are the only accents currently supported. The first four are all "wide". For example, you can write \widehat{ } if you like, but there's absolutely no difference either way (and \bar{ } and \overline{ } are identical). The last four accents only take a single character argument.

Other accent-like directives available in mimeTeX are   \underline{ } \cancel{ } \sout{ },   as well as   \overset{ }{ }   \underset{ }{ }   and the more ususal   \overbrace{ }^{ }   \underbrace{ }_{ }.   And \not also works on the single character immediately following it. Some of these directives are discussed in more detail below.

Function names...

All 32 usual LaTeX function names \arccos,...,\tanh are recognized by mimeTeX and treated in the usual way. MimeTeX also recognizes \tr for the trace, and also \bmod and \pmod. And those functions that normally take "limits" also behave as expected, e.g.,

\lim_{n\to\infty}S_n=S   produces  

long Arrows...

All mimeTeX \long and \Long arrows take an optional [width] argument that explicitly sets the arrow's width in pixels, scaled by \unitlength. For example, \longrightarrow[50] draws a 50-pixel wide arrow , whereas just \longrightarrow calculates a default width , as usual. And, in addition to the usual right, left and leftright arrows, there are also \long (and \Long) up, down and updown arrows that take an optional [height] argument, also scaled by any preceding \unitlength.

In the event that you actually want to place an []-enclosed expression immediately following an "unsized" long arrow, just place a ~ or any white space after the arrow, e.g., f:x\longrightarrow~[0,1] produces . Without any intervening white space, mimeTeX would have "eaten" the [0,1].

Super/subscripts immediately following all long/Long left/right arrows are displayed the same way \limits displays them, e.g.,

x\longrightarrow^gy   produces  
x\longrightarrow[50]^gy   produces  

Subscripted long arrows can occasionally be useful, too, as in Example 11 above, e.g.,

u\longrightarrow[50]_\beta v   produces  

To defeat this default behavior, e.g., \longrightarrow\nolimits^g displays super/subscripts in the usual way.

Super/subscripts immediately following all long/Long up/down arrows are treated correspondingly, i.e., superscripts are vertically centered to the arrow's left, and subscripts to its right. For example,

\longuparrow[30]^\gamma   produces  
\longdownarrow[30]_\gamma   produces      

whose occasional usefulness is also illustrated by Example 11. And as before, to defeat this default behavior, e.g., \longuparrow\nolimits^\gamma displays super/subscripts in the usual way.

\raisebox{ }{ } and \rotatebox{ }{ }...

The \raisebox{height}{expression} and \rotatebox{angle}{expression} commands help you fine-tune and manipulate mimeTeX renderings. The height argument is number of pixels, scaled by \unitlength, and can be positive or negative. The angle argument is number of degrees, and can also be positive (for clockwise) or negative, but must be a multiple of 90. Finally, the expression can be any valid LaTeX/mimeTeX expression. For example, mimeTeX's preprocessor defines the LaTeX ?` symbol, an upside-down question mark, like

abc\raisebox{-2}{\rotatebox{180}?}def   produces  

\compose{ }{ }...

\compose[offset]{base}{overlay} superimposes the overlay expression on top of the base expression, displaying the result. Optionally, the overlay is horizontally offset by the specified number of pixels (positive offsets to the right, negative to the left). For example,

\compose{\LARGE O}{\normalsize c}   produces  

Separately or in some judicious combination, \compose and \raisebox and \rotatebox should help you construct special symbols not "natively" available with mimeTeX's limited set of built-in font families. This can be especially useful in conjunction with the -DNEWCOMMANDS compile-time option discussed above.


\ga displays \gamma, but just \g displays \gg (>>). That is, mimeTeX selects the shortest symbol or command which begins with whatever you type. This feature can help shorten an otherwise very long line, but it may be a bit dangerous.

The mimeTeX preprocessor, briefly mentioned above, is responsible for recognizing several LaTeX symbols like \ldots and several commands like \atop . These symbols and commands cannot be abbreviated. The special html characters like &nbsp; are also recognized by the preprocessor and cannot be abbreviated.


Rudimentary color commands are provided by mimeTeX. You can write \color{red} or \color{green} or\color{blue} (which may be abbreviated \red or \green or \blue) anywhere in an expression to render the entire expression in the specified color. That is, abc{\red def}ghi renders the entire expression red, not just the def part. Also, note that mimeTeX's "green" is actually color #00FF00, which the html standard more accurately calls "lime". For example,

\blue e^x=\sum_{n=0}^\infty\frac{x^n}{n!}   produces  


TeX represents characters by boxes, with no idea how ink will be distributed inside. So an expression like \frac12\int_{a+b+c}^{d+e+f}g(x)dx is typically rendered as   . But mimeTeX knows the character shapes of its fonts, and therefore tries to remove extra whitespace, rendering the same expression as     instead.

Precede any expression with the mimeTeX directive \nosmash to render it without "smashing". Or compile mimetex.c with the -DNOSMASH option if you prefer the typical TeX behavior as mimeTeX's default. In this case, precede any expression with \smash to render it "smashed". And note that explicit space like \hspace{10} or \; , etc, is never smashed.

The scope of \smash and \nosmash is the { }-enclosed subexpression in which the directive occurs. For example, if you want the g(x) part of the preceding example smashed, but not the 1/2 part, then the expression \nosmash\frac12{\smash\int_{a+b+c}^{d+e+f}g(x)dx} renders as   .

For finer-grained control, note that \smash is shorthand for the default \smashmargin{+3} (and \nosmash is shorthand for \smashmargin{0}). \smashmargin's value is the minimum number of pixels between smashed symbols. The leading + is optional. If present, the font size (\tiny=0,...,\Huge=7) is added to the specified minimum. Compile mimetex.c with the -DSMASHMARGIN=n option to change the default from 3 to n. Compare the preceding example with the over-smashed \smashmargin{1}     instead.

Smashing is in "beta testing" and some expressions still don't look quite right when smashed, e.g., 1^2,2^2,3^2,\ldots renders as . Just compile with -DNOSMASH if you come across numerous annoying situations.

\not and \cancel and \sout...

The usual LaTeX   \not   "slashes" the single symbol following it, e.g.,   i\not\partial\equiv i\not\nabla   produces .

For arbitrary expressions, mimeTeX provides   \cancel   which draws a line from the upper-right to lower-left corner of its argument, e.g.,   a\cancel{x^2}=bx^{\not3}   produces   .

Finally, similar to the ulem.sty package,   \sout   draws a horizontal strikeout line through its argument, e.g.,   \sout{abcdefg}   produces . MimeTeX's \sout also takes an optional argument that adjusts the vertical position of its strikeout line by the specified number of pixels, e.g.,   \sout[+2]{abcdefg} produces   and   \sout[-2]{abcdefg} produces .

(IIe) \begin{array}{lcr}...\end{array} Environment  

Rendering vectors and matrices, aligning equations, etc, is all done using the customary LaTeX environment   \begin{array}{lcr} a&b&c\\d&e&f\\etc \end{array}   which you can write in exactly that form. MimeTeX also recognizes the following array-like environments

\begin{array}{lcr} a&b&c \\ d&e&f \\ etc \end{array}
\begin{matrix} a&b&c \\ d&e&f \\ etc \end{matrix}
\begin{pmatrix} a&b&c \\ d&e&f \\ etc \end{pmatrix}
\begin{bmatrix} a&b&c \\ d&e&f \\ etc \end{bmatrix}
\begin{Bmatrix} a&b&c \\ d&e&f \\ etc \end{Bmatrix}
\begin{vmatrix} a&b&c \\ d&e&f \\ etc \end{vmatrix}
\begin{Vmatrix} a&b&c \\ d&e&f \\ etc \end{Vmatrix}
\begin{eqnarray} a&=&b \\ c&=&d \\ etc \end{eqnarray}
\begin{align} a&=b \\ c&=d \\ etc \end{align}
\begin{gather} a \\ b \\ etc \end{gather}

There's a built-in maximum of 64 columns and 64 rows. Nested array environments, e.g., \begin{pmatrix}a&\begin{matrix}1&2\\3&4\end{matrix}\\c&d\end{pmatrix}, are permitted.

MimeTeX also provides the abbreviation   \array{lcr$a&b&c\\d&e&f\\etc}   which has exactly the same effect as   \begin{array}{lcr} a&b&c\\d&e&f\\etc \end{array}. And the lcr$ "preamble" in \array{lcr$etc} is optional. In that case,   \array{a&b&c\\d&e&f\\etc}   has exactly the same effect as   \begin{matrix} a&b&c\\d&e&f\\etc \end{matrix}. You can also write \(\array{etc}\) to "manually abbreviate" the pmatrix environment, or \array{rcl$etc} to abbreviate eqnarray, but mimeTeX has no explicit abbreviations for these other environments. For example,

\begin{matrix}a_1&a_2&a_3\\b_1&b_2&b_3\\c_1&c_2&c_3\end{matrix}   produces  

Solid \hline's (but not \cline's) and vertical l|c|r bars are available, as usual. For dashed lines and bars, \begin{array} provides the additional features \hdash and l.c.r . \hline and \hdash may not be abbreviated. For example,

\begin{array}{c.c|c} a_1&a_2&a_3 \\\hdash b_1&b_2&b_3
\\\hline c_1&c_2&c_3 \end{array}

The default font size is unchanged by \array{ }, but you can explicitly control it in the usual way, e.g., {\Large\begin{matrix}...\end{matrix}} renders the entire array in font size 4. In addition, any &...& cell may contain font size declarations which are always local to that cell, e.g., &\fs{-1}...& renders that one cell one font size smaller than current.

The {lcr} in \begin{array}{lcr} sets left,center,right "horizontal justification" down columns of an array, as usual. And "vertical justification" across rows defaults to what we'll call baseline, i.e., aligned equations, as in Example 10 above, display properly. But the down arrows (for     and for   ) in Example 11 require "vertical centering" across the middle row of that array. So, in addition to lowercase lcr, mimeTeX's {lcr} in \begin{array}{lcr} may also contain uppercase BC to set "B"aseline or "C"enter vertical justification across the corresponding rows. For example, \begin{array}{rccclBCB} sets baseline justification for the first and third rows, and center justification for the second row. Without any BC's, all rows default to the usual B baseline justification.

MimeTeX has no \arraycolsep or \arraystretch parameters. Instead, \begin{array}{lc25rB35C} sets the absolute width of the second column to 25 pixels, and the absolute height of the first row to 35 pixels, as illustrated by Example 9. Any number following an lcrBC specification sets the width of that one column (for lcr), or the height of that one row (for BC).
\hspace{35}" alt="" border=0> You can optionally precede the number with a + sign, which "propagates" that value forward to all subsequent columns for lcr, or all subsequent rows for BC. For example, \begin{array}{lc+25rB+35C} sets the absolute width of column 2 and all subsequent columns to 25 pixels, and the absolute height of row 1 and all subsequent rows to 35 pixels. After absolute sizing has been set, the special value 0 reverts to automatic sizing for that one row or column, and +0 reverts to automatic sizing for all subsequent rows or columns. For example, \begin{array}{c+25ccc+35ccc+0} sets the absolute widths of columns 1-3 to 25 pixels, columns 4-6 to 35 pixels, and then reverts to automatic sizing for columns 7 and all subsequent columns.
\hspace{35}" alt="" border=0> The "propagation" introduced by + is local to the \begin{array} in which it occurs. So you have to repeat the same specifications if you want rows aligned across several arrays on the same line (or columns aligned on several lines separated by \\). Instead, a lowercase g globally copies your column specifications to all subsequent arrays, and an uppercase G globally copies your row specifications. And gG copies both column and row specifications. For example, \begin{array}{GC+25} sets the height of all rows in this array to 25 pixels, and ditto for all subsequent arrays to its right. Explicit specifications in subsequent arrays override previous global values.
\hspace{35}" alt="" border=0> Click one of the following examples to see illustrations of the above discussion:

See Examples 8-11 above for several additional \begin{array}{lcr} applications.

(IIf) \picture( ){ } "Environment", including \line( ){ } and \circle( )  

Besides \begin{array}{lcr}, mimeTeX also tries to emulate the familiar LaTeX picture environment with the somewhat similar
          \picture(width[,height])  { (loc1){pic_elem1} (loc2){pic_elem2} ... }
as illustrated by Examples 12-13 above. Arguments surrounded by [ ]'s are optional. If the optional [,height] is omitted, then height=width is assumed. Locations (loc1) and (loc2) ... each denote either a \put(loc) or a \multiput(loc), and each location is of the form ([c]x,y[;xinc,yinc[;num]]).

A \put(loc) is denoted by a location of the form ([c]x,y) where x,y denotes the coordinate where the lower-left corner of the subsequent picture_element will be placed, unless the letter c precedes the x-number, in which case cx,y denotes the center point instead. The very lower-left corner of the entire picture is always 0,0, and the upper-right corner is width-1,height-1. Note, for example, that you'd never want to specify location c0,0 since the picture_element would be mostly out-of-bounds (only its upper-right quadrant would be in-bounds).

A \multiput(loc) starts like a \put(loc), but location [c]x,y is followed by ;xinc,yinc[;num] indicating the x,y-increments applied to each of num repetitions of picture_element. If ;num is omitted, repetitions continue until the picture_element goes out-of-bounds of the specified width[,height]. Note that x,y are always positive or zero, but xinc,yinc may be postive, zero or negative.

The \picture(,){...} parameters width, height, x, y, xinc, yinc may be either integer or may contain a decimal point, and they're all scaled by \unitlength. The num parameter must be integer.

Picture_element's {pic_elem1} and {pic_elem2} ... may be any expressions recognized by mimeTeX, even including other \picture's nested to any level.

\line( ){ } and \circle( )...

To help draw useful picture_element's, mimeTeX provides several drawing commands, \line(xinc,yinc)[{xlen}] and \circle(xdiam[,ydiam][;arc]). Although primarily intended for use in \picture's, you can use them in any mimeTeX expression, e.g.,   abc\circle(20)def   produces   .

Without its optional {xlen} parameter, the expression (x,y){\line(xinc,yinc)} draws a straight line from point x,y to point x+xinc,y+yinc. The inc's can be positive, zero or negative. Don't prefix location x,y with a leading c for \line's; the intended "corner" is determined by the signs of xinc and yinc. If given, the optional {xlen} parameter rescales the length of the line so its x-projection is xlen and its slope is unchanged.

Without optional ,ydiam and ;arc, the expression (x,y){\circle(xdiam)} draws a circle of diameter xdiam centered at x,y. Don't prefix location x,y with a leading c for \circle's; centering is assumed. If ,ydiam is also given, then (x,y){\circle(xdiam,ydiam)} draws the ellipse inscribed in a rectangle of width xdiam and height ydiam centered at x,y.
      Finally, ;arc specifies the arc to be drawn, in one of two ways. An ;arc argument given in the form ;1234 interprets each digit as a quadrant to be drawn, with 1 the upper-right quadrant and then proceeding counterclockwise, e.g., \circle(12;34) specifies the lower half of a circle whose diameter is twelve.
      Alternatively, an ;arc argument given in the form 45,180 or -60,120 specifies the endpoints of the desired arc in degrees, with 0 the positive x-axis and then proceeding counterclockwise. The first number must always be smaller than the second (negative numbers are allowed), and the arc is drawn counterclockwise starting from the smaller number.

Besides Examples 12-13 above, it's hard to resist illustrating
      \unitlength{.6}   \picture(100) {
          (50,50){\circle(99)} %%head%%
          (20,55;50,0;2){\fs{+1}\hat\bullet} %%eyes%%
          (50,40){\bullet} %%nose%%
          (50,35){\circle(50,25;34)} %%upper lip%%
          (50,35){\circle(50,45;34)} %%lower lip%%   }

Have a nice day!

(IIg) Other mimeTeX Commands  

Various and sundry other LaTeX-like commands are also provided by mimeTeX. In addition to features explicitly discussed below, mimeTeX supports the usual sub_scripts and super^scripts, and most of the typical LaTeX commands, many already discussed above, including

All these typical commands should behave as they usually do in LaTeX, and won't be discussed further. Short discussions of some other commands follow.

\stackrel{ }{ } and \relstack{ }{ }...

\stackrel{ }{ } behaves as usual in LaTeX, rendering its first argument one font size smaller and centered above its second. And the amsmath-style \overset{ }{ } is identical. For example,

"\vec x\stackrel{\rm def}=(x_1\ldots x_n)"   produces  

"Conversely" to \stackrel{ }{ }, mimeTeX provides \relstack{ }{ }, which renders its second argument one font size smaller and centered below its first. And the amsmath-style \underset{ }{ } renders its first argument one font size smaller and centered below its second. For example, the \log function name doesn't treat limits like \lim_, but you can write, for example,

"\relstack{\log}{\rm base 2}32=5"   to render  

MimeTeX's \limits provides an easier but non-standard alternative to achieve the same effect. For example,

"\vec x =\limits^{\rm def} (x_1\ldots x_n)"   produces  

and   "\log\limits_{\rm base 2}32=5"   produces  

\fbox{ }...

In case html border attributes aren't suitable, mimeTeX provides the usual \fbox{expression} command, e.g.,

"\fbox{x=\frac12}"   produces  

You can also write \fbox[width]{expression} to explicitly set the box's width, or you can write \fbox[width][height]{expression} to explicitly set both width and height.

\today and \calendar...

\today   renders     in the usual LaTeX text mode way. That's \today's default format#1. MimeTeX has an optional format argument so that, for example,   \blue\today[2]   renders   ,   showing both date and time. And   \red\today[3]   renders   ,   showing time only.

To accommodate time zones, you may also write, for example,   \small\blue\today[2,+3],   which renders   ,   adding three hours to format#2. The arguments may be in either order. The time zone increment must always be preceded by either + or -, and must be in the range -23 to +23.

\calendar   renders a calendar for the current month, as illustrated by the left-hand image below. For a different month, the optional argument   \small\blue\calendar[2001,9]   renders the right-hand image, for the requested year and month. Years must be 1973...2099 and months must be 1...12.


The default calendar emphasizes the current day of the current month, while any other month emphasizes no day. Day emphasis is controlled by an optional third argument.   \calendar[0,0,1]   emphasizes the first day of the current month, and   \calendar[2001,9,11]   emphasizes the eleventh day of that month.   \calendar[0,0,99]   renders the current month with no day emphasized.

(IIh) Other Exceptions to LaTeX Syntax  

Binding Exceptions...

MimeTeX's bindings are pretty much left-to-right. For example, although mimeTeX correctly interprets \frac12 as well as \frac{1}{2}, etc, the legal LaTeX expression x^\frac12 must be written x^{\frac12}. Otherwise, mimeTeX interprets it as {x^\frac}12, i.e., the same way x^\alpha12 would be interpreted, which is entirely wrong for \frac. The same requirement also applies to other combinations of commands, e.g., you must write \sqrt{\frac\alpha\beta}, etc.

Concluding Remarks  

I hope you find mimeTeX useful. If so, a contribution to your country's TeX Users Group, or to the GNU project, is suggested, especially if you're a company that's currently profitable.

Copyright © 2002-2005, John Forkosh Associates, Inc.
email: john@forkosh.com
\hspace{100}" alt="" border=0> \blue{\small\rm You're the } \Large\counter[counters.log]{counters.txt:mimetex.html}\\[0] {\small\rm visitor to this page." alt="" border=0 align=bottom>