Last modified: 2014-02-16 20:35:00 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 T37481, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35481 - MathJax allows more commands than texvc
MathJax allows more commands than texvc
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Math (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: physikerwelt
:
: 44422 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-26 09:48 UTC by Michael M.
Modified: 2014-02-16 20:35 UTC (History)
7 users (show)

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


Attachments
List of commands (1.22 KB, text/plain)
2012-03-28 09:09 UTC, Michael M.
Details

Description Michael M. 2012-03-26 09:48:09 UTC
MathJax renders more commands than texvc, for example \lhd. This will be a problem when users with "MathJax" option insert formulas which only produce an error message for users with "PNG".
One possible solution for this problem is to pass all TeX code through texvc and reject it for all modes when an error occurs.
When the TeX code for MathJax is output in a way which can't be achieved by wiki syntax (bug 35479, bug 35480) this will even avoid problems like https://github.com/mathjax/MathJax/issues/43. See http://leuksman.com/mw/index.php/User:Schnark/long for an example (WARNING: This will freeze your browser for a while, but you should be able to abort. Visit at your own risk.)
Comment 1 Derk-Jan Hartman 2012-03-26 19:51:12 UTC
The solution proposed by Nageh is to simply ignore these for now: 

For instance:
pagecolor: ['Macro','',1] // ignore \pagecolor{}

if someone has or can make lists of such commands, that would be handy. Please add here.
Comment 2 Michael M. 2012-03-28 09:09:43 UTC
Created attachment 10338 [details]
List of commands

From source code I extracted lists of both the commands allowed in texvc and
MathJax, and diffed them. I hope that the attached list is complete. I didn't test it, so there may be false positives.

Pay special attention to he command \href, which allows to circumvent the spam blacklist; there may be other things that shouldn't be available on public wikis.

Additionally, these environments seem to be allowed only in MathJax:

align*
multline
multline*
split
gather
gather*
alignat*
alignedat
aligned
gathered
subarray
equation
equation*
eqnarray
eqnarray*
Comment 3 Michael M. 2013-01-29 09:24:03 UTC
*** Bug 44422 has been marked as a duplicate of this bug. ***
Comment 4 physikerwelt 2014-02-08 12:12:59 UTC
I think the additional commands are no longer allowed in MathJax. Since (serverside) MathJax is going to be the default rendering mode, we wanted to make sure that the list of commands is well defined. As a first step we used the list specified by texvc and extracted the whitelisting of those to a seperate program called texvccheck
http://www.formulasearchengine.com/texvccheck
Comment 5 physikerwelt 2014-02-08 12:15:22 UTC
I think this bug can be closed.
Comment 6 Andre Klapper 2014-02-10 12:48:18 UTC
(In reply to comment #5)
> I think this bug can be closed.

Feel free to do so?

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


Navigation
Links