Mudanças entre as edições de "MathJax Templates"
Linha 1: | Linha 1: | ||
__MATHJAX__ | __MATHJAX__ | ||
− | + | == Particularidades do MathJax == | |
== Issues on MathJax rendering inside a template == | == Issues on MathJax rendering inside a template == |
Edição das 23h20min de 11 de janeiro de 2013
Particularidades do MathJax
Issues on MathJax rendering inside a template
Recently our mediawiki was upgraded to 1.20.2, and the MathJax extension (0.7) was installed. I had a wikipage with lots of formulas inside templates, which rendered great with texvc, and got broken with MathJax extension. This is a list of the issues I've to deal with, and the solution found. In each case, the first form is problematic with MathJax, but renders well with texvc and respect the syntax of a general template.
For illustration we will be using the simple Template:Formula:
<span style="font-size:130%"> {{{1}}} </span>
- ( the equal sign problem ):
{{Formula | <math>a=b</math> }}
This syntax works well with texvc and fails with MathJax option of standart math extension and MathJax extension. The alternative, naming the parameter, correct the problem in this case:
{{Formula | 1= <math>a=b</math> }}
a=b
- ( the double curly brackets )
{{Formula | <math>\dot{\mathbf{x}}</math> }}
The first pair of double brackets ends the template!! Providing more spaces between the brackets inside the template correct the render
{{Formula | <math>\dot{\mathbf{x} }</math> }}
˙x=Ax
- ( the vertical bar problem )
{{Formula | <math> \|x\|_2</math> }}
is weird. A Latexian correction could be:
$ \newcommand{\norm}[1]{ \| #1 \|_2 } $
{{Formula | <math> \norm{x} </math> }}
‖x‖2