[BETA] MathJax phpBB Integration

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Ideas Centre
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [ALPHA] MathJax phpBB Integration

Post by sergio91pt »

mathdlir, math bbcodes have exactly the same mechanics as regular bbcodes...

If dynamic loading isn't disabled MathJax isn't even loaded if theres no math bbcode to process.
mirrormirror
Registered User
Posts: 4
Joined: Tue Oct 22, 2013 10:19 am

Re: [ALPHA] MathJax phpBB Integration

Post by mirrormirror »

Hello! I installed mathjax successfully and wrote a test topic with the sample code:

Code: Select all

[latex]\sqrt{4} = 2[/latex]
however it only displays the [math] text instead of the rendered thing. any idea what's wrong?

this is the link of the post:

http://185.2.102.33/koinoniko-frontisti ... hp?f=3&t=3

can someone tell if something's wrong ?
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [ALPHA] MathJax phpBB Integration

Post by sergio91pt »

mirrormirror wrote:Hello! I installed mathjax successfully and wrote a test topic with the sample code:

Code: Select all

[latex]\sqrt{4} = 2[/latex]
however it only displays the [math] text instead of the rendered thing. any idea what's wrong?

this is the link of the post:

http://185.2.102.33/koinoniko-frontisti ... hp?f=3&t=3

can someone tell if something's wrong ?
You need to copy styles/prosilver/template/mathjax.html to styles/subsilver2/template/mathjax.html.
User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [ALPHA] MathJax phpBB Integration

Post by muggins »

Sergio, why is this still Alpha? The mod works with no errors... :?
Muggins
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [ALPHA] MathJax phpBB Integration

Post by sergio91pt »

muggins wrote:Sergio, why is this still Alpha? The mod works with no errors... :?
No good reason :)
I've bumped it to beta. RC will come after some backlog features are (finally) implemented.
User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [BETA] MathJax phpBB Integration

Post by muggins »

Good to hear! What remains?
Muggins
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [BETA] MathJax phpBB Integration

Post by sergio91pt »

muggins wrote:Good to hear! What remains?
Basic style configuration and permission checks on key files.
arack
Registered User
Posts: 1
Joined: Sun Jan 12, 2014 11:14 pm

Re: [BETA] MathJax phpBB Integration

Post by arack »

Hi, i'm using your plugin, but i wanted to use \( .. \) and \[ .. \] for writing latex code.
I read that but it seems you made some changes in the meanwhile :lol:
What should I do?

Marco
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [BETA] MathJax phpBB Integration

Post by sergio91pt »

arack wrote:Hi, i'm using your plugin, but i wanted to use \( .. \) and \[ .. \] for writing latex code.
I read that but it seems you made some changes in the meanwhile :lol:
What should I do?

Marco
Now it uses and is fully dependent on the bbcode system, so only [abc]1+1[/abc] is supported.
Simplest way is to not use this mod at all, and just add the JS library and use the default parser.
The problem with this approach is that LaTeX rendering may be triggered anywhere in the page (including titles) and each page will incur a small overhead (js download + full text parsing), even if theres no math there.
User avatar
Grey_and_big
Registered User
Posts: 11
Joined: Sat Jan 18, 2014 9:33 am

Re: [BETA] MathJax phpBB Integration

Post by Grey_and_big »

Thanks for your MOD, it's working perfectly!

But there is one question about default size of symbols in my formulas. In my site pages I use some pre-settings before using MathJax.js:

Code: Select all

<script type="text/x-mathjax-config">
        MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
          MathJax.InputJax.TeX.prefilterHooks.Add(function (data) {
            if (!data.display) {data.math = "\\displaystyle{"+data.math+"}"}
          });
        });
 </script>

<script type="text/x-mathjax-config">
		MathJax.Hub.Register.StartupHook("mml Jax Ready", function () {
          MathJax.ElementJax.mml.math.prototype.defaults.scriptsizemultiplier  
			= .8;
          MathJax.ElementJax.mml.math.prototype.defaults.scriptminsize =  
			"12px";
        });
</script>

<script type="text/javascript" src="../../mathjax/MathJax.js?config=TeX-AMS_HTML-full"></script>
For example this is a link to one of such pages: http://math1.ru/education/funct_sev_var/extr2.html. Is it possible to use this settings in my phpbb3 forum?
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [BETA] MathJax phpBB Integration

Post by sergio91pt »

Yes, its possible. Place them in styles/prosilver/template/mathjax.html.
User avatar
Grey_and_big
Registered User
Posts: 11
Joined: Sat Jan 18, 2014 9:33 am

Re: [BETA] MathJax phpBB Integration

Post by Grey_and_big »

Thanks a lot. I have copied these functions into mathjax.html and its working correctly :)
Emperor Vega
Registered User
Posts: 207
Joined: Fri Feb 07, 2014 12:45 pm

Re: [BETA] MathJax phpBB Integration

Post by Emperor Vega »

Hi sergio91pt,
How to I use CDN tools in phpBB? It says to copy some code to some documents.
I am not a programmer and I don't know these stuff.
Please help :cry:
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [BETA] MathJax phpBB Integration

Post by sergio91pt »

Emperor Vega wrote:Hi sergio91pt,
How to I use CDN tools in phpBB? It says to copy some code to some documents.
I am not a programmer and I don't know these stuff.
Please help :cry:
By CDN tools, you mean this Wordpress plugin? Or you want to use MathJax's CDN instead of hosting the javascript library?
Emperor Vega
Registered User
Posts: 207
Joined: Fri Feb 07, 2014 12:45 pm

Re: [BETA] MathJax phpBB Integration

Post by Emperor Vega »

sergio91pt wrote: By CDN tools, you mean this Wordpress plugin? Or you want to use MathJax's CDN instead of hosting the javascript library?
MathJax's CDN instead of hosting the javascript
Locked

Return to “[3.0.x] MODs in Development”