Tweak the position of spaces between function invocations and arguments
so that the expansion of mediawiki-specific functions (`\Rho`, etc) is
consistent with how spacing is added to normal function invocations.
This helps ensure that `texvc`/`texvccheck` is idempotent -- that is,
that it can parse what it emits, and render it without change.
Change-Id: I05fc8fa0201debf611ed4900d3cc953a6a8188ac
but \operatorname to fix Bug 31442. More specifically, TEX_FUN1 now
adds braces as it did in previous versions. The result is texvc will
once again correctly sanitize multiple math accents even when no braces are
given (e.g. \dot \vec B) and it will allow math accents to be used with
symbols whose font as been changed (e.g. \tilde \mathcal{M}). Parser
tests are created to ensure these continue to work.
The handling of \operatorname is now handled specially by the
function TEX_FUN1nb (nb stands for no braces and the name is taken to
be consistent with the existing function TEX_FUN2nb). The addition of
braces causes this command to LaTeX incorrectly. The parser test for
\operatorname has been updated to reflect the fact the hash of the
images involved has changed.
* (bug 18912) Add math support for \sen Spanish variant of \sin
* (bug 18912) Fix spacing for \operatorname in math
Reapplies r86962, r87117, r87936, r87941 plus some parser tests.
Note that further batch testing to identify any other potential problems due to the spacing tweaks is a good idea!
Reapplied r87092 (tests added, tweaked for merge, no functional diff) to allow "'" and "`" in \text{...} bits.
I'm not convinced this is a sufficient fix -- there are probably a *lot* more where this came from.
But it doesn't hurt to add them!
While these mostly look like they seem to do what they claim, *none* of them provide any test cases.
Most don't even include an example in the commit messages.
arithmetic operations. In particular in displaying x-2 it should use
the entity − in MathML as well. Also changed spacing so an
opporation such as "+" would render as <mo> + </mo> instead of
<mo>+</mo>.
additional space was necessary in the LaTeX code when rendering
functions such as \sin foo32. Also a few lines of code were removed
from texutil.ml that are now handled by lexer.mll.
been added, but the parser now recognizes numbers containing decimal
points as being renderable using <mn>. The delimiters (,[,{ now render
using <mo> tags, this allows for equations such as "y=f(x)" to be
rendered to MathML. Finally for standard functions such as \sin, now
render as <mi>\sin</mi>⁡, etc so standard function names
are supported.
functions are handled in lexer.mll. In particular lexer.mll failed to
insert a space that, in some cases rendering errors. This bug has now
been corrected.
mathematical function names when translating to HTML; adds support for
the sen, the Spanish name for sin; and corrects a bug that eliminates
spacing around \operatorname{...} in the resulting png. More
specifically, texvc now dectect whether or not a
standard function such as is followed by a delimitier such as (, {, [
etc. and adds a space or not as appropriate. This issue The code has been
reorganized to include a list of standard LaTeX commands whose spacing
rules are the same, and treates them all on an equal footing. It
similarly treats functions defined for mediawiki in the same way it
treats standard latex functions. One addition function is added, \sen,
and others can be added easily if necessary. Finally LaTeX generated
by texvc contained to many braces which altered the spacing created by
the command \operatorname, this has now been corrected. These last
two changes address the issues raised in bug 18912 and the chaning in
translation to HTML address most, but not all, of the issues raised in
bug 6722 .
* (bug 14202) $wgUseTeX has been superseded by the Math extension. To re-enable
math conversion after upgrading, obtain the Math extension from SVN or from
http://www.mediawiki.org/wiki/Extension:Math and add to LocalSettings.php:
require_once "$IP/extensions/Math/Math.php";
This is an initial stab, and a few things remain to be cleaned up:
* messages need to be moved from core to extension
* MW_MATH_* constants should be moved to the extension from core
* old back-compat math names interfaces using those constants should be removed from message files
* classic edit toolbar's math button should be added from the extension (or else dropped) -- currently there's not a clean hook, but could do it by JS
* couple of things like the 'armourMath' function on Language & LanguageConverter may want to be redone just as an unconditional, if that's simpler.
Setting $wgUseTeX alone will no longer have any affect. The var's still there for the moment as a few bits still need to be fully moved out from core.