Commit graph

665 commits

Author SHA1 Message Date
Alexandre Emsenhuber 6d10f1d229 svn:eol-style native 2011-12-10 09:19:05 +00:00
Brion Vibber f0f9ec9b9f Drop a trailing ',' in an array def; causes errors in IE 6 and IE 7 2011-12-08 23:00:10 +00:00
Sam Reed 862067c688 Fix/update some svn properties 2011-12-06 12:28:38 +00:00
Brion Vibber a36b0e04d8 Initial experimental import of MathJax source into Math extension as a client-side rendering supplement to the PNG rendering.
* Pulled in MathJax 1.1 (minus the 112 megabytes of PNG "fonts")
* Pulled in some of <https://en.wikipedia.org/wiki/User:Nageh/mathJax> bits for initialization

This doesn't currently override PNG images, but does replace the text-form if you configure it.
2011-12-06 01:17:35 +00:00
Raimond Spekking 21d5a36553 Localisation updates for core and extension messages from translatewiki.net 2011-11-29 20:32:09 +00:00
Raimond Spekking d58264551e Fix PHP error from r104575
PHP Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/betawiki/projects/mediawiki-ext/Math/Math.i18n.php on line 2235
Full export will readd missing messages.
2011-11-29 19:11:40 +00:00
Brion Vibber bbb9f29942 Followup r104498: remove now-unused messages for dropped math rendering modes 2011-11-29 16:53:25 +00:00
Brion Vibber 1042006fd4 Experimental option $wgMathUseMathJax to have Extension:Math load things via MathJax.
If enabled, by default loads MathJax from a CDN and forces all equations through MathJax when JavaScript is available -- the image or source form gets used only as <noscript> fallback.

This has a couple of problems for us:
* if scripts are missing -- such as when viewed via MobileFrontend -- you end up with no math at all, as the <script type="math/tex"> bits get ignored but the <noscript> still hides the images.
* while MathJax is loading things, blank spots on the page may appear and stuff jumps around
* if loading new text in via ajax, it doesn't trigger there

Also using some fairly default config, no idea how appropriate it is. Hoping to get some insight from Nageh who's done some of the MathJax work on Wikipedia so far - <https://en.wikipedia.org/wiki/User_talk:Nageh#MathJax_integration_into_stock_MediaWiki>
2011-11-29 00:37:13 +00:00
Brion Vibber 09679f2f39 Disable the partial HTML and MathML rendering options for Math extension.
MathML mode was so incomplete most people thought it simply didn't work (bug 25646).
HTML modes often rendered poorly (eg req bug 24207 to set default to PNG on some sites)

This may cause regressions in that simple "equations" of just variables that came out as HTML
will now render as PNGs that don't get aligned properly with the text baseline. Fixing this is
covered by bug 32694: <https://bugzilla.wikimedia.org/show_bug.cgi?id=32694> to retrieve the
baseline info from dvipng and position images to fit.

Note that because of the way user options are pulled in to the oarser cache key, some folks
may see cached pages with their old settings until they get redone or they save their prefs
again and have it normalized.
2011-11-28 22:30:33 +00:00
Raimond Spekking ecf798b9de Localisation updates for core and extension messages from translatewiki.net 2011-11-26 20:30:25 +00:00
Siebrand Mazeland 1ec1eb76d5 Localisation updates from http://translatewiki.net. 2011-11-23 18:43:52 +00:00
Platonides 8aab88b76d wfEscapeSingleQuotes() change proposed by Ralf Lederle in
https://bugzilla.wikimedia.org/show_bug.cgi?id=13518#c11
For Bug 13518 - <math> does not work (wrong shell escaping under Windows)
2011-11-17 16:25:25 +00:00
Antoine Musso 040710a2f9 missing TEX_FUN1nb in html_render_deep()
The new TEX_FUN1nb introduced by r99741 was not added to the
html_render_deep() pattern matching list. This was spotted by
an ocaml compilation warning:

 File "html.ml", line 74, characters 31-2966:
 Warning 8: this pattern-matching is not exhaustive.
 Here is an example of a value that is not matched:
 TEX_FUN1nb (_, _)::_
2011-11-15 17:26:28 +00:00
Raimond Spekking 672be6a3a1 Localisation updates for core and extension messages from translatewiki.net 2011-11-14 09:16:03 +00:00
Raimond Spekking cbfcda65b2 Localisation updates for core and extension messages from translatewiki.net 2011-11-09 20:18:41 +00:00
Raimond Spekking c08ccbc3b9 Localisation updates for core and extension messages from translatewiki.net 2011-11-08 20:32:28 +00:00
Raimond Spekking 14342c080d Localisation updates for core and extension messages from translatewiki.net 2011-10-31 20:25:58 +00:00
Raimond Spekking 4e6905c619 Localisation updates for core and extension messages from translatewiki.net 2011-10-27 20:00:32 +00:00
Nicholas Longo a2b53e5a36 The following patches restore how texvc added braces for all commands
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.
2011-10-13 23:04:41 +00:00
Alexandre Emsenhuber 2494e28140 Added path to extension's credits show that it can show SVN revision on Special:Version 2011-09-30 20:55:54 +00:00
Brion Vibber 77bbd35329 * (bug 6722) Spacing fixes for math functions with/without parens
* (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!
2011-09-14 00:49:16 +00:00
Brion Vibber d2cf3c244b * (bug 19547): Apostrophe / single quotes in math \text{...}
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!
2011-09-13 22:24:27 +00:00
Brion Vibber 8d495dcc32 * (bug 27754) Archaic Greek letters for math
May require texlive-lang-greek package to be installed; but it's only loaded when these bits are used.
Reapplied r87298 plus parser test case to confirm the new chars can render and the existing \digamma hasn't changed.
2011-09-13 22:14:01 +00:00
Brion Vibber dd490761b5 * (bug 27324) \euro support for <math>
Reapplied r87284 with a tweak to allow \euro through to conservative HTML output.
Parser test case added to confirm that \euro is HTMLable and the other euro variants are renderable to images.

This commit also includes tweaks to HTMLification of \phi, \varphi, and \varepsilon (conservative HTML) and changes the non-conservative HTMLification of number sets from plain letters to the dedicated Unicode chars for their symbols. These changes are not included in tests, but don't alter what input is supported.
2011-09-13 21:48:07 +00:00
Brion Vibber 6d5b5679fd Followup r97001: fix for Math parser tests image URLs
Setting $wgMathPath to a fixed value during parser test runs so the values are predictable.
2011-09-13 21:03:38 +00:00
Brion Vibber ae124a1e73 * (bug 26380) Add support for \widetilde to <math>
Reapplied r86965 (patch by Thenub314), plus parser test case to ensure that \widetilde{x} actually renders. (While we can't compare the contents of the image, the output hash will remain stable in the img url. Forcing $wgMathPath to a fixed fake path for parsertests.
2011-09-13 21:02:50 +00:00
Brion Vibber b76538b6b0 Revert changes to texvc that provide no test cases or examples of what they're fixing: r86962, r86965, r87092, r87117, r87284, r87298, r87934, r87936, r87941, r88030, r88260
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.
2011-09-13 19:00:51 +00:00
Siebrand Mazeland b2cc170f64 Localisation updates from http://translatewiki.net.
Full rebuild of all messages files for extensions supported by Translate.
2011-08-17 00:10:33 +00:00
Raimond Spekking 358dbd6e67 Localisation updates for core and extension messages from translatewiki.net (2011-07-26 20:13:00 UTC) 2011-07-26 20:46:49 +00:00
Sam Reed 16b234384a More wfMkdirParents() __METHOD__ additions 2011-07-25 22:09:05 +00:00
Raimond Spekking db20e016f9 Localisation updates for core and extension messages from translatewiki.net (2011-07-19 19:45:00 UTC) 2011-07-19 20:10:05 +00:00
Raimond Spekking 03edacd875 Localisation updates for core and extension messages from translatewiki.net (2011-07-18 19:50:00 UTC) 2011-07-18 20:05:52 +00:00
Sam Reed 0af538dbbe Improve documentation, remove unused global 2011-07-17 21:11:24 +00:00
Raimond Spekking 98121de634 Localisation updates for core and extension messages from translatewiki.net (2011-07-09 19:33:00 UTC) 2011-07-09 20:12:43 +00:00
Raimond Spekking a77392fbf5 Localisation updates for core and extension messages from translatewiki.net (2011-07-02 20:44:00 UTC) 2011-07-02 20:52:25 +00:00
Raimond Spekking e5976333fc 2011-06-29 20:25:45 +00:00
Raimond Spekking 4382f54492 Localisation updates for core and extension messages from translatewiki.net (2011-06-21 20:15:00 UTC) 2011-06-21 20:39:02 +00:00
Raimond Spekking 65492f2676 Localisation updates for core and extension messages from translatewiki.net (2011-06-18 19:52:00 UTC) 2011-06-18 20:03:21 +00:00
Chad Horohoe 2d20c56bb7 Get rid of addNewExtension()/getNewExtensions() method of adding new extensions (added in r81266). Since r85021, this isn't necessary because we run old updates like we should. Fix the 3 extensions using it. Reverts most of r81266, all of r84868, tiny part of r86741. Also ping r89653 which is what caused me to look at this again. 2011-06-07 17:33:34 +00:00
Brian Wolff b75a2171f1 Make the onParserTestTables method static, since the hook is called statically.
Fixes: Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method MathHooks::onParserTestTables() should not be called statically in /var/www/w/phase3/includes/Hooks.php on line 235
2011-05-23 17:05:39 +00:00
Nicholas Longo 7346759250 The following change fixes minor issues with the MathML display of
arithmetic operations.  In particular in displaying x-2 it should use
the entity &minus; in MathML as well.  Also changed spacing so an
opporation such as "+" would render as <mo> + </mo> instead of
<mo>+</mo>.
2011-05-16 19:25:46 +00:00
Nicholas Longo a7dc3ef012 Removed the &ApplyFunction; MathML entity. This entity doesn't
survive sanitizing.  It can be rendered by the corresponding unicode
character, but this doesn't display correctly without the proper fonts
installed.
2011-05-14 03:04:08 +00:00
Nicholas Longo e9f24f5264 A change to fix a bug in LaTeX rendering of function names. An
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.
2011-05-13 00:01:44 +00:00
Nicholas Longo 0a98d44540 Corrects a small bug causing <math>\sin</math> to return an unknown
function error
2011-05-12 22:29:32 +00:00
Nicholas Longo c60fa06a6a This updates improves the MathML support of texvc. New new tags have
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>&ApplyFunction;, etc so standard function names
are supported.
2011-05-12 21:46:18 +00:00
Raimond Spekking 81a8e25eaa Localisation updates for core and extension messages from translatewiki.net (2011-05-09 21:19:00 UTC) 2011-05-09 21:32:46 +00:00
Sam Reed 34d456e1f8 Kill off the long deprecated $wgInputEncoding and $wgOutputEncoding globals 2011-05-06 22:09:47 +00:00
Raimond Spekking 2f7dc372df Localisation updates for core and extension messages from translatewiki.net (2011-05-05 20:28:00 UTC) 2011-05-05 20:38:04 +00:00
Nicholas Longo 37300525a9 This update provides the functionality requested in bug 27754. More
specifically it provides the archaic greek letters defined in the
teubner package.  WARNING: This package requires the greek language
bable package, which on some linux systems is installed separately
from LaTeX.  As a result, texvc doesn't try to load this package
unless one of the archaic greek letters is being used.  This ensures
that the new commands do not prevent any of the old functionality from
operating as it did before.  

The following new commands are recognized. includes \Coppa, \coppa,
\varcoppa (synonym for \coppa), \Digamma, \Koppa (synonym for \Coppa),
\koppa, \Sampi, \sampi, \Stigma, \stigma, and \varstigma.

For more information see the comprehensive symbols table 280.  Note
that this update doesn't effect the current functionality of \digamma.
2011-05-02 21:13:45 +00:00
Nicholas Longo f095606895 This update fixes bug 27324 by loading the eurosym package to provide
the euro symbol.  This requires the eurosym package be available in
the installed LaTeX distribution.  Five new commands are now
recognized by texvc: \euro, \geneuro, \geneuronarrow, \geneurowide,
and \officialeuro.  All provide varients of the euro symbol, and \euro
is simply short alias for \officialeuro.  In addition some minor
changes have been introduced the html rendering of some math symbols.
The new choices provide html symbols that are higher degree of
similarity in comparison to the corresponding LaTeX symbols.
2011-05-02 19:28:25 +00:00