ActionsAllow distinction between inline and display mathClosed, ResolvedPublic

Description

Author: psychomessiah

Description:
Hi,
I think that adding a tag for inline TeX expressions (like $...$) and reserving $for displayed expressions (like $...$) would be a good workaround for the known problems -- before we can use MathML. In this way, the users would have a second, similar list of choices in their Math rendering Settings : one for each tag. By default, both would be set to « HTML if very simple », like now. But a user who has enough Unicode might want to set « HTML if possible » for inline TeX, and « Always PNG » for displayed TeX. « HTML if possible » still needs improvements, but it's better than nothing. I'll enter a bug for this too. And please don't tell me « keep your breath for BlahTeX ». We all know that MathML isn't currently usable. And when it'll be, the distinction between inline and displayed will be useful too. I've had this idea in response to the frequent lamentations on the french Wiki about mathematical typography, and it satisfied everyone in the mathematics project. Should I create a poll to show you the support ? A french developer told me that if a developer implemented this in a patch, we could apply it only in the french Wiki. Perhaps is it simpler and quickier to implement it in a patch than into Mediawiki. Thanks for your interest ! Version: unspecified Severity: enhancement See Also: https://bugzilla.wikimedia.org/show_bug.cgi?id=57437 bzimport added a project: Math.Via ConduitNov 21 2014, 9:56 PM bzimport set Reference to bz12223. bzimport created this task.Via LegacyDec 6 2007, 9:43 PM brion added a comment.Via ConduitDec 7 2007, 3:34 PM Rather than a poll, an example showing what difference it makes might be useful. :) bzimport added a comment.Via ConduitDec 7 2007, 4:49 PM psychomessiah wrote: Consider : Let [itex]f:x \mapsto y$ with
<center>$y = \int_0^x g(t) dt$</center>
we say that blablabla...

Currently, with the « HTML if simple » setting, the first expr. is rendered in PNG, which looks awful (bad alignment). But with the « HTML if possible » setting, the first expr. is rendered in HTML (good) but the second expr too, and that's even uglier (an array is used). It would be perfect if the first expr. is rendered in HTML and the second in PNG. Indeed, inline expressions are almost simple, but displayed expr. are generally more complicated and do not need to be perfectly aligned with the text. The two need a different rendering. Is it clearer ?

bzimport added a comment.Via ConduitDec 17 2007, 11:09 AM

psychomessiah wrote:

Hey ! Is there someone ?

brion added a comment.Via ConduitDec 18 2007, 7:30 PM

Created attachment 4449
Screen shots of example text in default, preferred HTML, and proposed mixed modes

Taken on Firefox 2/Mac.

Attached:

bzimport added a comment.Via ConduitDec 18 2007, 7:44 PM

psychomessiah wrote:

Yes, it is exactly what I suggest !

bzimport added a comment.Via ConduitJan 14 2008, 11:25 AM

psychomessiah wrote:

And now ?

bzimport added a comment.Via ConduitFeb 23 2008, 4:30 PM

psychomessiah wrote:

Hello !

bzimport added a comment.Via ConduitMar 22 2008, 1:48 AM

psychomessiah wrote:

Three months without even an answer ! At least, tell me that you reject my idea !

Tbleher added a comment.Via ConduitMar 26 2008, 5:51 PM

Mediawiki developers are generally very busy, so non-urgent issues may receive not so much attention.

There are two ways you can work around that:

• Code it up yourself (without looking deeply, what you want should be doable with an extension, without touching the MediaWiki core). If the extension works well and is simple enough, it has a much higher chance of being integrated.
• Ask on IRC - maybe someone is interested in fixing the bug for you.
fredw added a comment.Via ConduitSep 10 2013, 12:40 PM

This blocks bug 35479, which would allow to optimize a bit the MathJax mode by dropping the preprocessing phase. Currently the wiki2jax preprocessor has heuristics to guess inline or display mode (with more or less success).

The LaTeXML mode does not have this preprocessing phase and directly outputs <script type="math/mml"> for MathJax. However, it does not distinguish between inline or display mode, which is a serious issue atm.

Since all the formulas are currently in inline mode, what should be done instead is to add something to distinguish display equations. So for example keep

$...$

for inline math and allow something like

<math display="block">...[/itex] or <displaymath>...</displaymath>

to specify display mode.

(Of course, that would mean that people will have to reedit all the Math pages to explicitly specify display equations)

bzimport added a comment.Via ConduitSep 17 2013, 6:44 AM

physik wrote:

The patch that should link here:
https://gerrit.wikimedia.org/r/#/c/83666/

gerritbot added a comment.Via ConduitSep 17 2013, 8:28 PM

Displaystyle

https://gerrit.wikimedia.org/r/84629

gerritbot added a comment.Via ConduitSep 17 2013, 8:36 PM

Change 84629 merged by Physikerwelt:
Displaystyle

https://gerrit.wikimedia.org/r/84629

bzimport added a comment.Via ConduitSep 17 2013, 8:49 PM

physik wrote:

bzimport added a comment.Via ConduitSep 18 2013, 5:05 PM

physik wrote:

png-rendering with the proposed option display

Attached:

bzimport added a comment.Via ConduitSep 18 2013, 5:05 PM

physik wrote:

mathml-rendering with the proposed option display

Attached:

bzimport added a comment.Via ConduitSep 18 2013, 5:09 PM

physik wrote:

I created a demo page concerning the issue.
http://math-test2.instance-proxy.wmflabs.org/w/index.php?title=Displaystyle

You can test it with Firefox in MathML mode. (The default behavior.)

If you want to test it in png mode you have to log in using the user

png

iLovePictures

MathJaX does not work at the moment, but will be once there is a agreement that the demopage looks like you want it to look like.

bzimport added a comment.Via ConduitSep 3 2014, 7:20 PM

physik wrote:

I just realized that equations are not centred in PNG mode tested at
https://en.wikipedia.org/wiki/User:Physikerwelt/bug5600#foobar
The computed style-sheet

img.mwe-math-fallback-png-display {

display: block;

}

seems to be ok

bzimport added a comment.Via ConduitSep 3 2014, 7:24 PM

physik wrote:

It seems that this would need an additional div block...
do we want that?

Aklapper added a project: Wikisource.Via WebTue, Mar 10, 4:16 PM