Currently, the logic for math tag attribute display is the following.
- Not set
-> mathoid rendering mode 'tex' , $tex -> '{\displaystyle ' . $tex . '}' , span-element
- block
-> mathoid rendering mode 'tex', $tex -> '{\displaystyle ' . $tex . '}'; , div-element
- inline
-> mathoid rendering mode 'inline-tex', $tex -> '{\textstyle ' . $tex . '}' , span-element
- linebreak
only supported in LaTeXML rendering mode
$tex -> '\[ ' . $tex . ' \]';, div element
See https://www.mediawiki.org/wiki/Extension:Math/Displaystyle for documentation, examples, and discussions.
In https://phabricator.wikimedia.org/T111712#6653762 it was proposed:
make <math> tags without argument to be inline math. Anything that needs more letters to type or is more complicated will never be accepted. ...
Currently, the default is more like block, and also mathjax3 defaults to block
http://docs.mathjax.org/en/latest/web/typeset.html?highlight=mode%20display#conversion-options
I @Physikerwelt would like to simplify the rendering pipeline and make it more standard. Therefore, I would like to extend the proposal and stop the modification of the tex code, based on the display attribute. Thus MathJax (or any other renderer that will be used in the future +5years) needs to deal with the tex code as it was entered and the display attribute will only be passed as a parameter.
However, I am afraid that changing the default, will cause a lot of broken pages. If we default to block and also use div elements to make formulae real blocks, it will break all the inline occurrences of formulae. This is so bad, that the articles will become infeasible to read. Thus this is not an option departed here. The alternative, which was proposed, will however cause that formulae typed with :<math will have small operators, this is also a regression, but I think it is OK if we have a mechanism (i.e., bot) to convert :<math to -><math display=block.
Alternatives:
- do nothing
- add new tags as aliases for <math display=X, e.g, <mathblock>, or <dmath>, or <m2>
We need a community vote on that.