Welcome Guest. [Login/Register]

How to edit formulas

Thanks for getting started in adding context to our website! We have two different viewer modes to our website:

  • rich text editor;
  • plain text editor.

It is very simple to switch between the two different modes with the "Switch to rich/plain text editor" link below the input window. The rich text editor is a "what-you-see-is-what-you-get" editor, just like Open Office or Microsoft word. The plain text editor requires some html skills.

In both modes it is possible to add formulas in (almost) tex-style. Below we have put together a list of all the available tex-commands available on our site. Please, let us know if our instructions are useful, or if should reviece this page. In any case contact us if you encounter problems editing your sites, we are happy to help.


 

  • Inline math

    Writing maths works as in LaTeX. Use dollar signs to enclose inline math, e.g.
    $x^2$    ►►►   $ x^2 $.

  • Paragraph math

    Examples for paragraph math are
    \[ x^2 \] ►►►

    \[ x^2 \]

    and
    $$x^2$$ ►►►

    $$x^2$$

    (both variants are equivalent).

  • Display-style inline math

    There is also a display-style inline math environment, compare
    $\sum_{k=1}^\infty \frac{1}{k}$ ►►► $ \sum_{k=1}^\infty \frac{1}{k} $ and
    $!\sum_{k=1}^\infty \frac{1}{k}$ ►►► $\displaystyle \sum_{k=1}^\infty \frac{1}{k} $.

  • Usage of dollar sign

    To make a dollar sign, you have to type
    \$ ►►► $
    as in LaTeX!

  • LaTeX environment

    Arbitrary LaTeX code can be rendered as in this example:
    <tex>Let $x^2$ be a natural number.</notex> ►►► Let $x^2$ be a natural number.

  • Equation environment

    There are also more elaborate environments to write math - they support auto-numbering, referencing and more. These environments are <equation> and <equations>. They both support the same attributes.</equations> </equation>
    E.g. rendering an equation with a different resolution:
    <equation dpi="200">e^{i \cdot \pi} = -1.</equation> ►►►

    \[ e^{i \cdot \pi} = -1. \]

  • Equation numbering and referencing

    To give the equation automatically a number, you have to give it an id:
    <equation id="euler_1">e^{i \cdot \pi} = -1. </equation> ►►►

    \[ e^{i \cdot \pi} = -1. \] (1)

    You now can produce a link to that equation by typing
    \ref{euler_1} ►►► 1,
    or even better
    (\ref{euler_1}) ►►► (1).
    You can also give it a name instead of a number: <equation id="euler" name="Euler's Identity">e^{i \cdot \pi} = -1.</equation> ►►►

    \[  e^{i \cdot \pi} = -1, \] (Euler's Identity)

    and then (\ref{euler}) ►►► (Euler's Identity).

  • Equation arrays

    An example for the <equations> environment is given by:
    <equations>
    \int \ln(x) \;dx
    &= \int 1 \cdot \ln(x) \;dx \\
    &= x \cdot \ln(x) - \int x \cdot \frac{1}{x} \;dx \\
    &= x \cdot \ln(x) - x
    </equations> ►►►

    \begin{align*}  \int \ln(x) \;dx &amp;= \int 1 \cdot \ln(x) \;dx \\ &amp;= x \cdot \ln(x) - \int x \cdot \frac{1}{x} \;dx \\ &amp;= x \cdot \ln(x) - x  \end{align*}

    .