Extension talk:SimpleMathJax
Add topicThis page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
deatils for installation missed
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello!
I'm not sure about how SimpleaMathJax works. I assume I don't need the Math extension, but I do need the MathJax extension.
Rendering with MathJax is also possible without installing it locally, by the the MathJax Content Delivery Network (CDN). (See http://docs.mathjax.org/en/latest/start.html#mathjax-cdn) Does SimpleMathJax has the posibilty to use this service? It would be the easiest way.
greetings, Patrick 85.216.2.109 07:26, 9 November 2014 (UTC)
- No, I was wrong. You simply have to install SmallMathJax and it's done!
- There are little differences to rendering with "mimetex":
- -formulars are not rendered if they are inside <syntaxhighlight lang='text'>-tags or in a line beginning with a blank. 85.216.2.109 21:56, 9 November 2014 (UTC)
- SimpleMathJax works fine. It uses MathJax CDN. That's why it's so simple. Jmkim dot com (talk) 04:12, 25 December 2014 (UTC)
Extension missing
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
- Hello,
- I would like to try this extension on my Wiki since it seems quite simpler than the math and MathJax ones but when I go and try to download it, the the distributor does not offer it. Is it normal? Thanks a lot. Letartean (talk) 18:55, 17 December 2014 (UTC)
- Since this extension is not in the WMF repo the distributor will not offer a download. I just amended the documentation. Now the link point to the right spot. [[kgh]] (talk) 21:41, 17 December 2014 (UTC)
- Works fine! Thanks for the quick response! Letartean (talk) 00:59, 18 December 2014 (UTC)
- Since this extension is not in the WMF repo the distributor will not offer a download. I just amended the documentation. Now the link point to the right spot. [[kgh]] (talk) 21:41, 17 December 2014 (UTC)
- hmm 76.68.138.82 (talk) 07:13, 16 October 2015 (UTC)
MathJax.js-URL should be configurable
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello,
I really like this extension, small, simple, does everything I need.
There is only one thing I would like to have: The possibility for configuring the URL for the MathJax.js-location. I put my local URL directly into SimpleMathJax.class.php, but a variable in LocalSettings.php would be nice.
I don’t know enough from the MediaWiki-Interna about adding additional variables, so I can’t provide a patch. Delphin64 (talk) 14:41, 3 January 2015 (UTC)
- 128.68.89.36 (talk) 22:34, 2 July 2015 (UTC)
- I am not sure that will work, but something makes me believe that simply putting variable name in here:
- <script src='${wgDesiredMathJaxScriptURLVariableExample}'></script>" );
- and then putting your local URL into variable wgDesiredMathJaxScriptURLVariableExample in LocalSettings.php should do the trick.
Kumagor0 (talk) 22:36, 2 July 2015 (UTC)
Sporadic but very frequent red [Math Processing Error] instead of formulas
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I see a red [Math Processing Error] replacing formulas in my wiki. The formulas themselves are okay. When I refresh the page, some of them are displayed correctly, some of them get replaced by the error message. Once in a while after many refreshes, I see all of the formulas correctly.
What might be the source of this error? 131.188.6.20 10:51, 4 February 2015 (UTC)
- I have never seen 'Math Processing Error' without TeX syntax error. Can you show me an example? Jmkim dot com (talk) 11:36, 23 August 2016 (UTC)
Is there a way to disable Fast Preview by default?
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
First of all, thanks for the extension, I love it, very easy to install and formulas look very nice especially compared to LaTeX ugly png's. And special thanks for customisable font size.
The only thing that makes me a bit sad that during rendering each formula is displayed on new line, completely messing up page that has a lot of formulas. I noticed that it stops to happen once I right-click some formula and go to Math Settings > Math Renderer and uncheck 'Fast Preview'.
So, the question is, can I somehow configure something so that every visitor of my wiki will have that option disabled by default? Kumagor0 (talk) 00:30, 3 July 2015 (UTC)
- Yes, the preview isn't very useful on MW. Now, it is disabled and hidden. (v0.5) Jmkim dot com (talk) 02:42, 22 May 2017 (UTC)
MathJax JavaScript-code not loaded when Wiki is accessed via https
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
The extension seems to be pretty nice.
However if I include it in our Wiki which is accessed via HTTPS the centralized Javascript-MathJax code referenced in <tt>SimpleMathJax.class.php</tt> is not loaded. As a result the formulas used on the article page are not rendered, but enclosed by <nowiki>[math]</nowiki> tags.
Changing the CDN-URL in line 20 from <code>http://</code> to <code>https://<code> solved the issue for me. 194.25.30.14 (talk) 09:12, 20 July 2015 (UTC)
- fixed by https://github.com/jmnote/SimpleMathJax/commit/5a3d04fb8716036ca42115041bd7b4d82e3ef690 Jmkim dot com (talk) 11:48, 1 February 2018 (UTC)
Getting SimpleMathJax to work
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello,
I am trying to get this extension to work. We are running MediaWiki version 1.25.1. I have done the following:
- Installed the extension Math
- Installed the extension SimpleMathJax
- Added the following to LocalSettings.php:
require_once "$IP/extensions/Math/Math.php"; require_once "$IP/extensions/SimpleMathJax/SimpleMathJax.php";
$wgMathValidModes[] = MW_MATH_MATHJAX; $wgUseMathJax = true; $wgDefaultUserOptions['math'] = MW_MATH_MATHJAX; $wgDefaultUserOptions['mathJax'] = true; $wgMathDisableTexFilter = true; $wgSimpleMathJaxSize = 120;
- Ran the update script
- Verified at the MediaWiki special page Version that both Math (version 2.0.0) and SimpleMathJax (version 0.3) are listed as installed extensions.
- Verified at the page Preferences that client-side MathJax is the preferred Math option.
Now putting <math>E=mc^2</math> on a Wiki page, it is rendered as "$ E=mc^2 $" and not as a nice formula (both on Firefox and IE).
Did I miss a step? Did I do something wrong? Any help is greatly appreciated! Mjpnijmeijer (talk) 12:57, 2 September 2015 (UTC)
- It seems I solved the problem. I uninstalled the Math extension, staying only with the SimpleMathJax extension. The formula is rendered correctly now.
- What confused me was the page for the Math extension (Extension:Math). The way I understood it is that Math can be combined with a client-side rendering extension MathJax, which is obsolete however and should be replaced with SimpleMathJax. Mjpnijmeijer (talk) 07:06, 4 September 2015 (UTC)
We are running MediaWiki version 1.26.
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
debian 8.2 - it work - OK! Wikipro (talk) 19:58, 15 December 2015 (UTC)
inlineMath problem
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi.
I ran into a problem with SimpleMathJax. It seems to still use \( and \) as tags for inlineMath, and I can't seem to escape that in any sane way.
The only thing I've managed to get working is using <span class="tex2jax_ignore">\(</span>, but it's not very efficient.
Is there any way to explicitly remove that tag from the tags that set up inline math? It seems pretty easy to do if you run the full math-extension, but with the config at the CDN, I can't figure out how that would be done. Xyyx (talk) 02:14, 25 February 2016 (UTC)
Using native latex syntax
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi, I'm setting up a wiki and loving the idea of using SimpleMathJax (such simple setup and beautiful results!).
Some of my wiki editors will be hardcore would like to be able to copy and paste latex directly into posts - is there a way to configure SimpleMathJax to look for $$ and \begin{...}, \end{...} rather than (or as well as) math tags? If not would anyone have any recommendations for how I might get started producing a workaround to achieve this?
Thanks for all your excellent work on this extension. Sparrigan (talk) 21:25, 30 May 2017 (UTC)
- Can you show me the examples? That will be very helpful to set the testing goals. Jmkim dot com (talk) 12:29, 12 June 2017 (UTC)
- Now, $wgSimpleMathJaxInlineMath (v0.7.0+ $wgSmjInlineMath) option added. Please check it out and tell me some feedback. Thanks. Jmkim dot com (talk) 13:17, 12 June 2017 (UTC)
SimpleMathJax does not work on my MediaWiki 1.29.1
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
=(
Copied these lines into my LocalSettings.php
require_once "$IP/extensions/SimpleMathJax/SimpleMathJax.php";
#$wgSimpleMathJaxSize = 120;
, but it does not work.
Tested the installation with <math>\Rightarrow</math>, but it does not render =( 178.203.235.86 (talk) 17:29, 18 October 2017 (UTC)
- You need to use
wfLoadExtension( 'SimpleMathJax' );
for the extension to work. I just updated the docu accordingly. [[kgh]] (talk) 18:49, 18 October 2017 (UTC) - =) Thank you! 178.203.235.55 (talk) 16:02, 19 October 2017 (UTC)
WRONG DOCS
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Variable names are wrong in documentation. Use this:
wfLoadExtension('SimpleMathJax');
$wgSmjInlineMath = "//(","//)";
$wgSmjSize = 150;
More notes:
- other than stated, default font size is 110 (not 125)
- $wgSimpleMathJaxUseCDN (and $wgSmjUseCDN) doesn't exist, but there is a $wgSmjScripts setting
- extension additionally registers by default for <chem> unless (undocumented) setting $wgSmjDisableChem is set to true
See GitHub repo for more details, especially https://github.com/jmnote/SimpleMathJax/blob/master/SimpleMathJax_body.php Sebastian.busch (talk) 10:30, 17 November 2017 (UTC)
- Sorry for that. Just updated the documentation. :) Jmkim dot com (talk) 11:35, 26 November 2017 (UTC)
Not working with IIS / MediaWiki 1.30
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Had v0.6.1 of this working, updated to v0.7.0 and it completely stopped. Put MWDebug::log and view it with debug toolbar to trace progress. The pages cause setup() to be entered, but never enters renderMath() from parser. I converted my Localsettings.php variables from v0.6.1 to new names as shown below.
wfLoadExtension( 'SimpleMathJax' ); $wgSmjSize = 125; $wgSmjInlineMath = [["$","$"],["\\(","\\)"]]; $wgSmjUseChem = true;
I even tried using formal <math> E=mc^2 </math> tags versus "$". Anything between 'math' tags does not display at all, anything between "$" shows up as plain text with the "$". As if parser doesn't recognize the wgSmjInlineMath[] setting. 108.174.102.87 (talk) 15:46, 30 January 2018 (UTC)
- Yes, obviously it's a bug of v0.7.0.
- Some kind of lazy loading was applied.
- But when we use inline math tag insted of typical math tag, loading module process was missing.
- Now(version 0.7.1), fixed by https://github.com/jmnote/SimpleMathJax/commit/d561f11f5a72e43153a94ecbc050597c8e66552f
- Thanks! Jmkim dot com (talk) 11:38, 1 February 2018 (UTC)
Not rendering anything
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi
Math extension was working really strange, so i tried installing simple mathjax to replace it. now the pages appear with no sign to math signs at all. no error, just as if the content was written without the math.
Any ideas?
thanks מיכה יניב (talk) 20:01, 3 February 2018 (UTC)
- OK, I made it work. it seems like version 7.1 messed things up for me. Luckily, i still had an older version (really old) and it works ok.
- I could not find what on the new version does not work, but on version 7.0 it did. מיכה יניב (talk) 20:43, 3 February 2018 (UTC)
- Sorry for that. Today, I realized the bug and fixed now. ( https://github.com/jmnote/SimpleMathJax/commit/30f924cbc59eb6a0d7a614daf54b4a67a56b1dfa ) Jmkim dot com (talk) 02:32, 4 February 2018 (UTC)
ext.SmjLocal won't load mhchem
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
When setting $wgSmjUseCDN to false, browser issues an error message when $wgSmjUseChem is true. Tracked this down to small bug in ext.SmjLocal.js. Fourth line should be:
if (mw.config.get('wgSmjUseChem') ) extensions.push("TeX/mhchem.js");
Instead of trying to load "TeX/mhchem3/mhchem.js"
I now have it fully working fully with a local installation. 108.174.102.87 (talk) 20:40, 5 February 2018 (UTC)
- You're right! I checked mhchem doc and fixed the bug. Thanks!
- I Jmkim dot com (talk) 11:10, 6 February 2018 (UTC)
Sometimes equations appear, sometimes they don't
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I am using MediaWiki 1.30.0 and SimpleMathJax 0.7.1. When I insert math content in an article, and click either Publish or Preview, sometimes the equations are rendered, but most of the time they are not. I usually need to refresh the article 2 to 4 times every time for the equations to finally show up. I am a bit lost here, do you have any idea of what might be causing this issue? Thank you so much! Parlance (talk) 11:25, 21 March 2018 (UTC)
- Thanks for your feedback.
- I checked out the bug "sometimes not rendering" and fixed it by
- https://github.com/jmnote/SimpleMathJax/commit/c75469823b6bf00e19031847c2952d39447d4ba7 Jmkim dot com (talk) 14:36, 26 March 2018 (UTC)
- Thank you, Jmkim. It works perfectly! :) Parlance (talk) 15:15, 27 March 2018 (UTC)
- Yay, your feedback made v0.7.2 released. Thanks again. Jmkim dot com (talk) 11:40, 28 March 2018 (UTC)
Undefined control sequence
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I am getting 'Undefined control sequence' errors for \tfrac and \operatorname operators.
It seems as though the correct MathJax module is in place as the \dfrac operator works fine.
Is this something to do with the difference in syntax between MathJax and mediawiki?
For example looking at 'Nyquist Theorem' from Wikipedia I get both the errors:
'Undefined control sequence \tfrac'
'Undefined control sequence \operatorname'
Thanks in advance MarvinSanderson (talk) 13:55, 27 March 2018 (UTC)
- eye of hawk!
- just now fixed by
- https://github.com/jmnote/SimpleMathJax/compare/55ef967...a96d8c3
- This change will be shipped in v0.7.3.
- Thanks a lot.
- ( Working demo - https://zetawiki.com/wiki/MathJax_frac_테스트 ) Jmkim dot com (talk) 12:26, 28 March 2018 (UTC)
- Thanks, I was having this issue with the Local repo rather than the CDN though - is it a similar fix? MarvinSanderson (talk) 13:56, 28 March 2018 (UTC)
- Now, the issue with the local repo also solved in v0.7.3.
- The key was the extension AMSmath.js.
- Take a look at this.
- https://github.com/jmnote/SimpleMathJax/compare/v0.7.2...v0.7.3 Jmkim dot com (talk) 14:14, 1 April 2018 (UTC)
Not rendering
[edit]RESOLVED | |
Thank you again for your help, Kim. It was after some settings on the server side (a security module activated by the hosting company which prevented the proper loading of some php on the website), as you pointed out. I used your investigation and understanding of the problem to explain the situation and I was quickly instructed on how to solve it. Thanks! |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello! It's me again, thank you again for your previous help. SimpleMathJax used to work previously, but now the rendering stops "halfway": the math tags are converted to [math]...[/math] and appear greyed out, but never quite finish the rendering process and appear as math equations. Here's an example from my site: http://www.gfferran.com/wiki/Test
I have no clue whether this has to do with my hosting server, my installation of mediawiki+extension, or even my computer. Any tips would be extremely appreciated! Thanks! Parlance (talk) 03:12, 17 April 2018 (UTC)
- It seems Google Chrome correctly renders the equations. Therefore, it's got something to do with Mozilla Firefox. I wonder if any of you have any clues as to what might be causing the problem in that browser?
- Edit: Now it also doesn't work on Chrome without having touched anything. It seems it always loads quite fast when accessing as a guest, but it stops rendering the equations once I log in with a user and I do few editions. I am at a loss here... Parlance (talk) 09:43, 17 April 2018 (UTC)
- I think your site http://www.gfferran.com/wiki/Test works fine as a guest on Chrome, Edge and Firefox... Do you see some message from your browser console? Your Special:Version page is not accessible. Detailed information could be helpful. MediaWiki version, SimpleMathJax version, config... Jmkim dot com (talk) 11:27, 17 April 2018 (UTC)
- Sorry, I don't have access to the settings file at this moment to make Special:Version public. Basically,
MediaWiki 1.30.0 PHP 5.6.32 (fpm-fcgi) MariaDB 10.1.29-MariaDB-1~jessie ICU 52.1 SimpleMathJax 0.7.3
- I haven't installed any other extension manually except CategoryTree.
- I see that the rendering happens or not depending on whether I am logged in or not. I wonder what could be causing that. I cleared the cache, sessions and everything else of my browser to no change. As soon as I log in again, equations stop working. Parlance (talk) 11:41, 17 April 2018 (UTC)
- Can you check MediaWiki:Common.js and SimpleMathJax configuration settings? wgSmjSize = 90; Is there anything else? What settings or extension you use for access control? I think it could be related or not. Jmkim dot com (talk) 12:39, 17 April 2018 (UTC)
- MediaWiki:Common.js is empty. Settings include nothing but what you said:For access control, I am using these lines (I am not sure if you are referring to this):
wfLoadExtension( 'SimpleMathJax' ); $wgSmjSize = 90;
See the rest of the settings file on this paste: https://pastebin.com/c0hJHjVE$wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['read'] = false; $wgWhitelistRead = array("Test", "test");
- Thank you for your time and patience, Kim!! Parlance (talk) 13:02, 17 April 2018 (UTC)
- Can you edit SimpleMathJax/modules/ext.SmjCDN.js file?
- This will show some messages on the browser console. Jmkim dot com (talk) 13:18, 17 April 2018 (UTC)
- Just did the change. [Edit: posted the console replying to your next message] Parlance (talk) 13:35, 17 April 2018 (UTC)
- Chrome browser --- F12 --- 'Console' tab Jmkim dot com (talk) 14:18, 17 April 2018 (UTC)
- There appears the following in the console:I see that it regards ext.SmjCDN and categoryTree modules, but I can't comprehend the rest of the error message. Parlance (talk) 14:23, 17 April 2018 (UTC)
Loading failed for the <script> with source “http://www.gfferran.com/load.php?debug=false&lang=en&modules=ext.SmjCDN%2CcategoryTree%7Cjquery.accessKeyLabel%2CbyteLength%2CcheckboxShiftClick%2Cclient%2CgetAttrs%2ChighlightText%2Cmw-jump%2Csuggestions%7Cmediawiki.RegExp%2CTitle%2Capi%2Ccldr%2CjqueryMsg%2Clanguage%2Cnotify%2CsearchSuggest%2Cstorage%2Cuser%2Cutil%7Cmediawiki.api.user%2Cwatch%7Cmediawiki.language.data%2Cinit%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%2Cstartup%7Cmediawiki.page.watch.ajax%7Csite%7Cuser.defaults&skin=modern&version=040mtsh”.
- Are you using any kind of AdBlock plugin on browser?
- Take a look at this. https://stackoverflow.com/questions/45879671/only-on-firefox-loading-failed-for-the-script-with-source Jmkim dot com (talk) 14:24, 17 April 2018 (UTC)
- The issue persists (and the console message keeps appearing) while running the browser in safe mode (no addons). Parlance (talk) 14:26, 17 April 2018 (UTC)
- Hmm...
- http://zetawiki.com/w/load.php?debug=false&lang=en&modules=ext.SmjCDN --- OK
- http://www.gfferran.com/load.php?debug=false&lang=en&modules=ext.SmjCDN --- OK
- http://www.gfferran.com/load.php?debug=false&lang=en&modules=ext.SmjCDN%2CcategoryTree%7Cjquery.accessKeyLabel%2CbyteLength%2CcheckboxShiftClick%2Cclient%2CgetAttrs%2ChighlightText%2Cmw-jump%2Csuggestions%7Cmediawiki.RegExp%2CTitle%2Capi%2Ccldr%2CjqueryMsg%2Clanguage%2Cnotify%2CsearchSuggest%2Cstorage%2Cuser%2Cutil%7Cmediawiki.api.user%2Cwatch%7Cmediawiki.language.data%2Cinit --- OK
- http://www.gfferran.com/load.php?debug=false&lang=en&modules=ext.SmjCDN%2CcategoryTree%7Cjquery.accessKeyLabel%2CbyteLength%2CcheckboxShiftClick%2Cclient%2CgetAttrs%2ChighlightText%2Cmw-jump%2Csuggestions%7Cmediawiki.RegExp%2CTitle%2Capi%2Ccldr%2CjqueryMsg%2Clanguage%2Cnotify%2CsearchSuggest%2Cstorage%2Cuser%2Cutil%7Cmediawiki.api.user%2Cwatch%7Cmediawiki.language.data%2Cinit%7Cmediawiki.libs.pluralruleparser --- Forbidden
- ----
- ----
- http://www.gfferran.com/load.php?debug=false&lang=en&modules=mediawiki.libs.pluralruleparser --- Forbidden
- https://www.mediawiki.org/w/load.php?debug=false&lang=en&modules=mediawiki.libs.pluralruleparser --- OK
- https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=mediawiki.libs.pluralruleparser --- OK
- https://zetawiki.com/w/load.php?debug=false&lang=en&modules=mediawiki.libs.pluralruleparser --- OK
- Is there any problem with "mediawiki.libs.pluralruleparser" on your site? Jmkim dot com (talk) 14:29, 17 April 2018 (UTC)
- After the initial installation, I have only installed the forementioned two extensions, edited the LocalSettings.php that I shared above, added a .httpaccess following Manual:Short URL, and imported some articles from an XML file. I don't think any of that affected any of the mediawiki libraries. Could you specify how to "look into" the problem with mediawiki.libs.pluralruleparser, I am not knowledgeable enough.
- Thank you for your patience, Kim! Parlance (talk) 14:51, 17 April 2018 (UTC)
- Looking at the network tab, there is:Parlance (talk) 14:30, 17 April 2018 (UTC)
Status Request URL 304 Not modified http://www.gfferran.com/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=modern 304 Not modified http://www.gfferran.com/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=modern 403 Forbidden http://www.gfferran.com/load.php?debug=false&lang=en&modules=ext.SmjCDN|jquery.accessKeyLabel,byteLength,checkboxShiftClick,client,getAttrs,highlightText,mw-jump,suggestions|mediawiki.RegExp,Title,api,cldr,jqueryMsg,language,notify,searchSuggest,storage,user,util|mediawiki.api.user,watch|mediawiki.language.data,init|mediawiki.libs.pluralruleparser|mediawiki.page.ready,startup|mediawiki.page.watch.ajax|site|user.defaults&skin=modern&version=0h6fpi7
- Can you tell me your settings DOCUMENT_ROOT( e.g. /var/www/html ) and mediawiki location( directory of index.php )? Jmkim dot com (talk) 15:05, 17 April 2018 (UTC)
- Where can I see DOCUMENT_ROOT? I used Plesk to install the latest MediaWiki instead of uploading it myself and configuring the database.
- Mediawiki is installed in the root folder, so index.php is inside /httpdocs/ if accessed via an ftp file manager. Parlance (talk) 15:12, 17 April 2018 (UTC)
- Did you try without CategoryTree?
- Jmkim dot com (talk) 15:18, 17 April 2018 (UTC)
# require_once "$IP/extensions/CategoryTree/CategoryTree.php"; # $wgUseAjax = true; # $wgCategoryTreeMaxDepth = array(CT_MODE_PAGES => 4, CT_MODE_ALL => 4, CT_MODE_CATEGORIES => 4); wfLoadExtension( 'SimpleMathJax' ); $wgSmjSize = 90;
- I did, I tried this a while ago, but it did not change anything. I left it commented since then for the moment just in case. Parlance (talk) 15:20, 17 April 2018 (UTC)
- Do you have any RewriteRule settings? /httpdocs/.htaccess file?
- http://www.gfferran.com/extensions/SimpleMathJax/modules/ext.SmjCDN.js --- OK
- http://www.gfferran.com/resources/src/mediawiki.libs/CLDRPluralRuleParser.js --- OK
- https://www.mediawiki.org/w/resources/src/mediawiki.libs/CLDRPluralRuleParser.js --- OK Jmkim dot com (talk) 15:32, 17 April 2018 (UTC)
- Yes. The .htaccess file contains this:(what's shown in Manual:Short_URL) Parlance (talk) 15:39, 17 April 2018 (UTC)
DirectoryIndex index.html index.php RewriteEngine On RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
- Can you try to move mediawiki directory(contains index.php) to /httpsdocs/w/ and config like below(LocalSettings.php and .htaccess)?
$wgScriptPath = "/w";
DirectoryIndex index.html index.php RewriteEngine On RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/w/thumb.php?f=$1&width=$2 [L,QSA,B] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/w/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
- This job may have high risk. You should back up /httpsdocs/ before starting this.
/httpdocs$ cd .. /$ cp -a httpdocs httpdocs.orig
- Forget it. This idea is not so good..... Jmkim dot com (talk) 16:16, 17 April 2018 (UTC)
- Sorry, by the time I saw the response you already edited it and suggested not to do it! I need to get some sleep; will continue searching for a solution tomorrow, please let me know if you can figure out a solution for this! Thank you so much!!! Parlance (talk) 16:37, 17 April 2018 (UTC)
- More cases...
- Forbidden
- ----
- OK (missing)
- ----
- http://www.gfferran.com/a.plus --- Forbidden
- http://www.gfferran.com/a.plu --- Forbidden
- http://www.gfferran.com/.plu --- Forbidden
- http://www.gfferran.com/.pl --- 404 Not Found
- http://www.gfferran.com/.lu --- 404 Not Found
- http://www.gfferran.com/.pu --- 404 Not Found
- http://www.gfferran.com/plu --- 404 Not Found
- ".plu" in URL makes Forbidden.
- Need to check Apache server settings... Good Night. See you later. Jmkim dot com (talk) 16:39, 17 April 2018 (UTC)
Equation numbering
[edit]It appears mathjax supports automatic equation numbering; is there any way to enable this within SimpleMathJax to get equation numbers and references within a wiki page? Rayhem (talk) 14:43, 18 May 2018 (UTC)
- Can you show me some examples used in MediaWiki? Jmkim dot com (talk) 13:28, 6 November 2020 (UTC)
Math in Live Preview
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hey folks,
I’m using the MinervaNeue skin in conjunction with the SimpleMathJax extension for math display (version numbers see below).
The live preview (…#editor) does not show rendered math output but raw LaTeX source code. Is there a way to re-invoke MathJax.Hub.Typeset() right after the preview text has been added to the DOM? Is there a hook or some other appropriate event for that?
MediaWiki: 1.31.0
MinervaNeue: (2e70e79)
SimpleMathJax: 0.7.3
(This is a copy of the original question: Skin talk:Minerva Neue/2018#h-Math_in_Live_Preview-2018-08-13T16:20:00.000Z) 2003:C4:5F15:4B00:3493:8B84:43CB:CC05 (talk) 19:27, 17 August 2018 (UTC)
- Hey! I think I figured out how to do this. This is a bit hacky; adjust the retry time (currently
1000
ms) to your liking. - I've got this in MediaWiki:Common.js:
function waitForMathJax($content) {
if (typeof MathJax === 'undefined') {
setTimeout(function () { waitForMathJax($content); }, 1000);
} else {
MathJax.Hub.Queue(["Typeset", MathJax.Hub, $content[0]]).execute();
}
}
mw.hook('wikipage.content').add(waitForMathJax);
131.111.184.83 (talk) 16:58, 12 March 2019 (UTC)- Thanks for sharing! Working well with MW 1.31.4 and SimpleMathJax 0.7.3. I shall add this to the extension page. Sm8ps (talk) 11:18, 20 October 2019 (UTC)
- From version 0.8.0, preview is supported without additional code. Jmkim dot com (talk) 17:34, 25 October 2020 (UTC)
- Great, thanks for that! I changed to extension page in order to account for this. Sm8ps (talk) 16:26, 3 November 2020 (UTC)
- Good, Thanks! Jmkim dot com (talk) 13:25, 6 November 2020 (UTC)
SimpleMathjax and Extension:MobileFrontend don't work
[edit]RESOLVED | |
Fixed in version 0.8.3+ |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi,
I'm using mediaWiki 1.31.
I install SimpleMathJax and it work well. Thanks for this extension.
But when i use Extension:MobileFrontend for a phone or tablet displaying, math formulas are not displayed.
Is there a way to fix this problem?
Thanks Gdwikimeca (talk) 08:26, 21 November 2018 (UTC)
- You can use extension:math if you can install.
- but there are pros and cons.
- extension:math
- pro - work with MobileFronted well. work with Visaul Editor ...
- con - you can't use \tag, \label \eqref ...
- extension:simplemathjax
- con - don't work with MobileFronted ...
- pro - you can use \tag, \label, \eqref ... Libattery (talk) 05:29, 31 January 2019 (UTC)
- I don't use MobileFrontend, but it seems to work. Try version 0.8.1. https://github.com/jmnote/SimpleMathJax/pull/16 Jmkim dot com (talk) 17:28, 25 October 2020 (UTC)
- Same issue for me. When using MobileFrontend, the formulas are displayed in raw math syntax (not rendered). I do use version 0.8.1 (and MW 1.34.0) Varlin (talk) 17:29, 21 November 2020 (UTC)
- Hello!
- I've made this quick fix in my fork to make the extension work with MobileFrontend.
- P.S. When I originally posted it, the fork used MathJax 2.7.3 for the mobile view. Today I've updated it, so that MathJax 3.1.4 is being used for both desktop and mobile view. Perfect Reason (talk) 14:31, 21 May 2021 (UTC)
- Thanks for the sharing, but I can't make it work (MW 1.35.3, using only SimpleMathJax, without integration in VE). Varlin (talk) 08:56, 2 October 2021 (UTC)
- Thanks for trying. Yeah, I have no idea why it works in some cases and doesn't in others, but it still works for me in MW 1.36.2 🤷. Perfect Reason (talk) 13:19, 20 October 2021 (UTC)
- You know what ? Now it works XD Varlin (talk) 17:12, 20 October 2021 (UTC)
- Hi! See my fix at https://github.com/Appropedia/SimpleMathJax
- I did a pull request to get it upstream, but until then, feel free to clone the Appropedia fork to get the fix, or see the diff to manually redo the changes on your own source code (they're quite trivial). Cheers! Sophivorus (talk) 12:55, 6 July 2022 (UTC)
mathoid
[edit]Is it possible to use parsoid with SimpleMathJax?
I could not find much information about the subject, excuse me if the answer is obvious
Thanks! Erentar2002 (talk) 23:45, 4 March 2019 (UTC)
ошибки
[edit]В mw1.31. wfLoadExtension ( 'SimpleMathJax' ); выдает ошибку, а require_once "$IP/extensions/SimpleMathJax/SimpleMathJax.php"; работает. 95.24.172.78 (talk) 17:09, 15 May 2019 (UTC)
Context menu missing
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I have been using SimpleMathJax 0.3 on MW-1.23 where there was a context menu for the MathJax formulae with entries like "Show Math As ...", "Math Settings" etc. Now with version 0.7.3 on MW-1.31 I do not see this anymore and cannot find any way to enable it. Is there something I am missing or has this feature been dropped? Sm8ps (talk) 11:23, 30 July 2019 (UTC)
- Now, the context menu is supported by default. It can also be set with $wgSmjEnableMenu. Try version 0.8.1. Jmkim dot com (talk) 17:38, 25 October 2020 (UTC)
Left Align Equations?
[edit]Does anybody know how to left align the display equation version of SimpleMathJax in MediaWiki, so that the following code (shown rendered here) in edit window, displays in left align mode?
:$$ A = - \left ( \frac{\partial G}{\partial \xi} \right ) _{p,T} $$ Sadi-Carnot 3 (talk) 23:04, 15 September 2020 (UTC)
- Now it can be set with $wgSmjDisplayAlign. Try version 0.8.1. Jmkim dot com (talk) 17:28, 25 October 2020 (UTC)
Visual Editor Integration
[edit]Hello, @Jmnote.
I would like to announce a modified version of Extension:SimpleMathJax which has an integration with Extension:VisualEditor and Extension:Math. It is available in this fork of the main git repository of the extension. I will be happy if this modified version is the basis for further development of the main repository.
Best regards. Spas.Z.Spasov (talk) 09:03, 14 March 2021 (UTC)
- This sounds exciting to me. Thank you for sharing this information and the link to the fork. However, I also believe that it should be in this extension rather than in a fork. [[kgh]] (talk) 22:31, 10 May 2021 (UTC)
- Similar behaviour can be acheived by using both but disabling the rendering of the math extension, this won't allow the math to be rendered in the visual editor with
C-S
but it will atleast give the dialog menu:110.141.255.56 (talk) 10:09, 8 July 2021 (UTC)# LocalSettings.php # This is needed to get the Formula menu item in Visual Editor wfLoadExtension( 'Math' ); # This is needed to prevent sending all equations to CDN (which can be slow) $wgDefaultUserOptions['math'] = 'source'; ## Mathjax to render LaTeX wfLoadExtension( 'SimpleMathJax' ); $wgSmjUseCDN = false;
- don't work in mediawiki 1.37 Uvas magicas (talk) 00:13, 25 November 2021 (UTC)
- Having the following in LocalSettings.php makes it work with MW-1.39:
wfLoadExtension( 'Math' ) ; $wgDefaultUserOptions['math'] = 'source'; $wgMathDisableTexFilter = 'always' ; wfLoadExtension( 'SimpleMathJax' ) ; $wgSmjExtraInlineMath = [ [ "$", "$" ] ] ;
- L2 sets the output mode Math to no rendering ('source'); L3 is a necessary setting for this to work. In this mode, Math will forward the Latex input without rendering, presenting it in a span-element like
$ :formula $
. - L5 tells SimpleMathJax to interpret text included within dollar signs as formula which it will then render.
- Many thanks to user @Kghbln for sharing his idea in the above post! Sm8ps (talk) 15:03, 18 July 2023 (UTC)
- When doing as described above, then the configuration settings from SimpleMathJax seemingly get over-ruled in the final CSS. Add the following lines to Comon.css to change that. L6 corresponds to the parameter $wgSmjScale.
- Sm8ps (talk) 15:18, 9 August 2023 (UTC)
.mwe-math-fallback-source-inline { vertical-align: baseline; } mjx-math { font-size: 81% !important; }
- the configuration don't work for chem formules Gota de agua (talk) 07:16, 29 September 2023 (UTC)
SimpleMathJax works great under MW 1.36
[edit]Hi Everyone,
Dropping a quick note... SimpleMathJax works great under MW 1.36. We have not observed any problems or issues.
Noloader (talk) 03:38, 30 May 2021 (UTC)
Thick frame around zommed expression, pop-up window too narrow
[edit]After upgrading to version 0.8.2 on MW-1.35.3, the pop-up window for zoomed expressions comes with a frame that is roughly the same size as the formula area height. In the top part, "MathJax Zommed Expression" is written at about one third of the height which is not very informative and even distracting.
Furthermore, the window is too narrow. For instance, it is about one third of the window size but only half of the formula is displayed, the rest needs to be shown by scrolling sideways. There would be more than enough space to double the size of the pop-up window within the main browser window.
Does anyone have any pointers about these issues? I have searched through the extension folder itself and have browsed through them MathJax documentation. Thanks in advance! Sm8ps (talk) 18:31, 1 September 2021 (UTC)
- Answering my own question after having had to delve into it once again. The following rules in Common.css will drastically reduce the borders of the pop-up window and at the same time enlarge its horizontal size.
- Some rules do need the !important-flag and I ended up simply adding it to all of them. Please understand that I do not have much experience with CSS, so these rules may need improvement. YMMV!
.CtxtMenu_Info { width: fit-content !important ; max-width: 80% !important ; padding: 0 0.5em !important; font-size: 50% !important; -webkit-border-radius: 10px !important; -moz-border-radius: 10px !important; -khtml-border-radius: 10px !important; } .CtxtMenu_InfoContent { font-size: 200% !important; max-width: unset !important ; margin: 0.5em 0px !important; padding-left: 0.2em !important; padding-right: 0.2em !important; padding-top: 0.2em !important; padding-bottom: 0.2em !important; } .CtxtMenu_InfoClose { top: 0 !important; right: 0 !important; }
- Nevertheless, it is nice to enlarge formulae during presentations using most of the screen width. Sm8ps (talk) 17:29, 18 July 2023 (UTC)
Not working
[edit]This extension is not working with 1.38 (when usecdn=false) 91.243.4.220 (talk) 16:08, 13 June 2022 (UTC)
Error using SimpleMathJax and ParserOutput with Mediawiki 1.38
[edit]We recently upgrade from Mediawiki 1.37 to 1.38. ParserOutput appears to be having some trouble with MW 1.38. It looks like SimpleMathJax may be calling the function incorrectly.
Deprecated: Use of ParserOutput::addModules with non-array argument was deprecated in MediaWiki 1.38. [Called from SimpleMathJaxHooks::renderTex in /var/www/html/w/extensions/SimpleMathJax/SimpleMathJaxHooks.php at line 34] in /var/www/html/w/includes/debug/MWDebug.php on line 377
<!DOCTYPE html>
I'm using SimpleMathJax from Git:
#git branch -a *master remotes/origin/HEAD -> origin/master remotes/origin/master
It also looks like SimpleMathJax does not follow Mediawiki conventions of offering branches for REL1_35, REL1_36, REL1_37, REL1_38, etc. So we have to use master. Noloader (talk) 02:27, 4 July 2022 (UTC)