Extension:Math/Displaystyle

This is demopage.

It is related to the Math extension of Mediawiki.

Attribute:display
We introduce the new attribute display with the two options "inline" and "block".

Technical implementation
Technically it will add the command \textstyle to the user input before the tex command is passed to the renderer. The result will be displayed without further alterations by outputting the image or MathMLelement to the page.

Remark
The convention https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style_(mathematics)#Using_HTML is really annoying. I'd prefer to use inline math for that, since it helps to

Technical implementation
Technically it will add the command \displaystyle will be added to the user input, if the user input does not contain the string \displaystyle or \align before the tex command is passed to the renderer. The result will be displayed in a new paragraph. Therefore the style of the MathImage is altered i.e. the style attribute "display:block;margin:auto" is added. For MathML it is ensured that display=inline is replaced by display block which produces a new paragraph

Discussion
Fréderic Wang would prefer that displaystyle is always added in depended of the fact if \displaystlye is already in the equation. He remarks that it has to be checked if that works if the equation starts with \begin.

Not specified
If nothing is specified the current behavior is preserved. That means all equation are rendered in display style but not using a new paragraph.

Example
The sum $$\sum_{i=0}^\infty 2^{-i}$$ converges to 2.

The next line-width is disturbed by large operators.

The code for the math example reads:

The equation
 * $$\text{geometric series:}\quad \sum_{i=0}^\infty 2^{-i}=2 $$

is used in a joke about mathematicians entering a bar and ordering beer.

It was entered as