You are not logged in. Click here to log in.

Codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Math plugin's demonstration page

Since 20.11-SP2

There is an Application Configuration option to control the font size globally for the Math and Latex plugin also.
The default font size is 12px, which could produce too small text when codeBeamer is running on Windows.
Minimum value for defaultFontSizePx is 12.
Individual font size settings on the plugin markup level will override the global setting. You can go below 12px with it.

"latexPlugin" : {
    "defaultFontSizePx" : 24
}

Since codeBeamer 20.11-LTS (Carmen)

Supported Latex Commands

The plugin renders the latex commands with MathJax 2.7.7.

The supported Latex commands are listed here:

https://docs.mathjax.org/en/v2.7-latest/tex.html#supported-latex-commands

Math Plugin

Math plugin is capable of rendering mathematical formulas in Wiki. These formulas are defined in the powerful LaTex language and will appear as an image embedded within the Wiki document.

Math plugin's Parameters

Parameters:

  • fontsize='24' override the default font size which is 12px. Use only numbers.
  • align='center' use it to center your math expression.
  • title='optional tooltip for the rendered image'
  • cache='false' true/false parameter to turn cache on/off. Default is true.
  • id='artifact Id which contains the formula'. You can link a document with id from project's documents page.
  • src='source URL or attachment name' Alternative location of the LaTeX text or formula.
  • text='alternatively you can put the text here'. Not recommended, exists only for backwards compatibility.
  • width='400' width is dynamic, but you can override it (not recommended).


Deprecated parameters (not processed):

  • usePng='true' By default an PNG formatted image is rendered, but setting this to false will generate a GIF image.
  • density='120' The DPI setting for the generated image
  • timeout='30' Timeout in seconds to render the content.

Inline mathematics expressions

Syntax for inline math

When

[{Math

a \ne 0
}]

, there are two solutions to

[{Math

ax^2 + bx + c = 0
}]

How is it looks like rendered

When

\( a \ne 0 \)

, there are two solutions to

\( ax^2   bx   c = 0 \)

Alternative syntax:

You can also use inline math mode delimiters \(...)\ or $...$ , but it is not necessary. The preferred syntax is to not use any start-stop commands.


[{Math

\(E=mc^2\)
}]

\(E=mc^2\)

[{Math

$E=mc^2$
}]
\( E=mc^2 \)

Centered equation

Syntax for centered equations:


[{Math align='center'

x = {-b \pm \sqrt{b^2-4ac} \over 2a}.
}]

\( x = {-b \pm \sqrt{b^2-4ac} \over 2a}. \)


Display style syntax (use align='center' instead):

Display style delimiters are not processed, and they will be rendered as inline style.
Please use align='center' to achieve display (centered) style.

\[...\] or $$...$$


[{Math

\[x = {-b \pm \sqrt{b^2-4ac} \over 2a}\]
}]

\( x = {-b \pm \sqrt{b^2-4ac} \over 2a} \)

[{Math

$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$
}]
\( x = {-b \pm \sqrt{b^2-4ac} \over 2a} \)


\begin{equation} works but will be rendered as inline math

[{Math

\begin{equation}
e^{\pi i} + 1 = 0
\end{equation}
}]

\begin{equation} e^{\pi i}   1 = 0 \end{equation}


Changing font size

By default Math plugin uses 12px, but you can override it with the fontsize attribute. The unit is pixels.

[{Math fontsize='32' align='center'

\frac{a\bcancel{b}}{\bcancel{b}}=a
}]

\( \frac{a\bcancel{b}}{\bcancel{b}}=a \)

If you provide not just a number but the unit also, the plugin will use the fallback 12px as it does not processes units just numbers.

[{Math fontsize='32px' align='center'

\ce{ C6H5-CHO }
}]

\( \ce{ C6H5-CHO } \)


Loading text from a file

You can upload a txt file to your project's Documents page and link it with its id to Math plugin. Please use just one equation without control characters.

[{Math id='12345'

}]