Last modified: 2011-04-30 01:21:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T24818, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22818 - :<math> tag works incorrectly with "leave as tex"
:<math> tag works incorrectly with "leave as tex"
Status: RESOLVED DUPLICATE of bug 23190
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.15.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 22851
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-12 13:48 UTC by Devin Balkcom
Modified: 2011-04-30 01:21 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Devin Balkcom 2010-03-12 13:48:15 UTC
When using <math> tags it is common to precede with a colon to indent. E.g:

:<math>x^2
+ y
</math>

This code breaks with the "leave as tex" option under preferences.  The y ends up on a different line, and a <pre> section is added to the document with just a dollar sign in it.

If we view source we can see what's happening.  The colon indents using <dl> tags.  In "leave as tex" mode we get something like:

<dl><dd>$ x^2
</dd></dl>
<p>+ y
</p>
<pre>$

when what we want is:

<dl><dd>$ x^2 + y$
</dd></dl>

The problem appears to be the order in which tags are added.  

I have the same trouble using the jsMath plugin -- works fine except when there's a colon before multiline math.
Comment 1 Platonides 2010-04-14 13:24:39 UTC
Should newlines be removed from the end of <math> or also from the middle? Or perhaps removed from the sides but those in the middle replaced with spaces.
Comment 2 mimamer 2010-04-14 14:28:58 UTC
IMO *any* whitespace (including newlines) should be replaced by a single space. That is how TeX works anyway. For additional spaces there are special markups. For newlines it is more logical to do this outside of <math> clauses.
Comment 3 Platonides 2010-04-14 21:23:05 UTC
Fixed in r65039.

*** This bug has been marked as a duplicate of bug 23190 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links