MimeTeX-Examples

<< | Cookbook-V1 | >>

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Examples of using MimeTeX

This page contains examples of using MimeTeX. Feel free to add more examples. The examples are categorized into:

For the full documentation, see http://www.forkosh.com/mimetex.html.

Basic examples

Some basic examples of math notation. Remember to place the math markup within

{$ ... $}
For example, the math markup x=y^2 should really be entered as
{$
x=y^2$}
.

Example

Result

Source markup

Superscript

{$ x^2 + y^2 = z^2 $}

x^2 + y^2 = z^2

Complicated superscript

{$e^{2\pi i} $}

e^{2\pi i}

Subscript

{$ x_1 + x_2 + x_3 $}

x_1 + x_2 + x_3

Fraction

{$ \frac a b = \frac {x+y} {x-y} $}

\frac a b = \frac {x+y} {x-y}

Sum

{$ \Bigsum_{n=0}^N x_n $}

\Bigsum_{n=0}^N x_n

Parenthesis

{$ \(1+\frac A B\)^n $}

\(1+\frac A B\)^n

Square root

{$ \sqrt x = \sqrt{a+b} $}

\sqrt x = \sqrt{a+b}

Greek

{$ \alpha, \beta, \gamma $}

{\alpha, \beta, \gamma

Small space

{$ a\,b = a b $}

a\,b = a b

Horisontal space

{$ a\hspace{10}b $}

a\hspace{10}b

Matrix

{$ \( \array{cc$ 0 & 1 \\ 2 & 3} \) $}

\( \array{cc$ 0 & 1 \\ 2 & 3} \)

Square matrix

{$ \[ \array{cc$ 0 & 1 \\ 2 & 3} \] $}

\[ \array{cc$ 0 & 1 \\ 2 & 3} \]

Space examples

Various horizontal spaces, remember to place the math markup within {$ ... $}.

ExampleResultMath markup
Negative space{$ a\!b $}a\!b
Thin space{$ a\,b $}a\,b
Medium space{$ a\:b $}a\:b
Thick space{$ a\;b $}a\;b
Quadratin space{$ a\quad b $}a\quad b
Double quadratin space{$ a\qquad b $}a\qquad b
"hspace{5}"{$ a\hspace{5}b $}a\hspace{5}b
"hspace{10"{$ a\hspace{20}b $}a\hspace{20}b

Delimiter examples

Note that the delimiters in the examples will automatically scale to fit whatever they surround. Various horizontal spaces, remember to place the math markup within {$ ... $}.

Example{$\hspace{20}$}Result{$\hspace{20}$}Math markup
Parenthesis{$\left( A \right)$}\left( A \right)
Curly braces{$\left{ A \right}$}\left{ A \right}
Square braces{$\left[ A \right]$}\left[ A \right]
Angle braces{$\left\langle A \right\rangle$}\left\langle A \right\rangle \
Bars{$\left| A \right|$}\left| A \right|
Double bars{$\left\| A \right\|$}\left\| A \right\|
Asymetric{$\left( A \right.$}\left( A \right.
Asymetric{$\left. A \right)$}\left. A \right)

MimeTeX also allows you to use the following shorthand:

Example{$\hspace{20}$}Result{$\hspace{20}$}Math markup
Parenthesis{$\( A \)$}\( A \)
Curly braces{$\{ A \}$}\{ A \}
Square braces{$\[ A \] $}\[ A \]
Angle braces{$\< A \> $}\< A \>
Bars{$\| A \| $}\| A \|
Double bars{$\= A \= $}\= A \=

This

{$ y = \{{\text{this} \atop \text{that}}\. $}

was created by the following math markup:

y = \{{\text{this} \atop \text{that}}\.

Text examples

Some different symbol sets and fonts:

Example{$\hspace{20}$}Result{$\hspace{20}$}Math markup
Normal math font{$ R $} R
Roman font{$ \textrm{R} $}\textrm{R}
Blackboard font{$ \mathbb{R} $}\mathbb{R}
Calligraphic font{$ \cal{R} $}\cal{R}
Script? font{$ \scr{R} $}\scr{R}
..{$ Some text $}{@Some text@]
Text{$\text{Some text}$}\text{Some text}
Italic text ?{$\textit{Some text}$}\textit{Some text}
Roman math text{$\textrm{Some text}$}\textrm{Some text}

This example

{$ f(x) \: = \: \textrm{An unknown function} $}

was generated by the following math markup:

f(x) \: = \: \textrm{An unknown function}

Accents (decorations)

Example{$\hspace{20}$}Result{$\hspace{20}$}Math markup
Vector{$\vec v$}\vec v
Vector{$\hat v$}\hat v
Vector{$\bar v$}\bar v
Vector{$\tilde v$}\tilde v
Vector{$\dot v$}\dot v
Vector{$\ddot v$}\ddot v

Miscellanoues examples

This

{$ e^x=\relstack{\rm lim}{n\rightar\infty} \(1+\frac xn\)^n $}

was generated from the following source:

{$ e^x=\relstack{\rm lim}{n\rightar\infty} \(1+\frac xn\)^n $}

This

{$ \bold \hspace{20} \atop{\raise{-11}{\fs3\swarr} \compose{\circle(140,30)}{\rm Have a nice day!}}{\vspace1} $}

was generated from the following source:

 {$ \bold \hspace{20} \atop{\raise{-11}{\fs3\swarr} \
   \compose{\circle(140,30)}{\rm Have a nice day!}}{\vspace1} $} 

This array

{$ \array{CCC $ a & b & c \\ d & e & f} $}

was generated by the following source:

{$ \array{CCC $ a & b & c \\ d & e & f} $}

This

{$\array{CCC$\Large f=b_\0+\frac{a_\1}{b_\1+\frac{a_2}{b_2+\frac{a_3}{b_3+a_4}}} & \hspace{10} {\small\rm{Notes and\atop mimeTeX Sandbox}} \hspace{10} } \Large \scrJ^{ij}=\frac12\vareps_{ijk}\[\array{cc$\sig_k&0\\0&\sig_k}\] $}

was generated by the following source:

 {$\array{CCC$\Large f=b_\0+\frac{a_\1}{b_\1+\frac{a_2}{b_2+\frac{a_3}{b_3+a_4}}} & \
   \hspace{10} {\small\rm{Notes and\atop mimeTeX Sandbox}} \hspace{10} } \
  \Large \scrJ^{ij}=\frac12\vareps_{ijk}\[\array{cc$\sig_k&0\\0&\sig_k}\] $} 

This

{$\large \Bigint\limits_^{-1$\infty} e^{-x^2} dx\ =\ \frac{\sqrt\pi}2$}

was generated by the following source:

{$\large \Bigint\limits_{-1$0}^{-1$\infty} e^{-x^2} dx\ =\ \frac{\sqrt\pi}2$}

{$ \varphi = \sqrt2 $}


{$ 1+\frac{1+\frac{1+\frac{a}{b}}{c}}{d} $}


Source: a {$ \hspace{10} $} b
Result: a {$ \hspace{10} $} b


Things that might need examples:

  • How to set font size
    • \tiny, \small, \normalsize, \large, \Large, \LARGE
    • MimeTeX short:
       \fs{0}, \fs{1} ... \fs{5}
      
      * [@ \frac{ }{ } 
      and { \over }
  • { \atop }
  • \sqrt{ }
  • \lim_{ } and all the usual LaTeX function names
  • \hat{ } and \widehat{ } and many of the usual LaTeX accents
  • \overbrace{ }^{ } and \underbrace{ }_{ }
  • \overline{ } and \underline{ }
  • stackrel and relstack
  • fbox
  • x\longrightarrow^gy produces {$ x\longrightarrow^gy $}
  • x\longrightarrow^{ab}y produces {$ x\longrightarrow^{ab}y $}
  • x\longrightarrow[50]^gy produces {$ x\longrightarrow[50]^gy $}

pmwiki-2.3.38 -- Last modified by {{chr}}

from IP: 85.171.160.186 ip should be disabled by default for security reasons