[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!
Scam Warning
Locked
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [ALPHA] MathJax phpBB Integration

Post by sergio91pt »

Citromon, yes there are. Have a look at this thread. Never tried, but I suppose the server will need latex installed (or equivalent).
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 »

You might also try Mimetex. It works quite well if you don't have a LaTeX distribution on your server.

MathTex is nicer, but you'll need LaTeX or a host that can provide you access to a cgi-bin parser as a remote call.
Muggins
engines
Registered User
Posts: 21
Joined: Sat Mar 02, 2013 4:17 pm

Re: [ALPHA] MathJax phpBB Integration

Post by engines »

Is there a way to have math input on a phpbb forum without knowing LaTEX syntax?
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 »

Your posters are going to need some standard syntax to use a bbCode to render math..

I don't quite understand what you mean. :?
Muggins
engines
Registered User
Posts: 21
Joined: Sat Mar 02, 2013 4:17 pm

Re: [ALPHA] MathJax phpBB Integration

Post by engines »

muggins wrote:Your posters are going to need some standard syntax to use a bbCode to render math..

I don't quite understand what you mean. :?
I'm trying to integrate math into my forum but I want to make it user friendly. For example to use the bold tags, you use tags.
When I integrate this, all math will be entered using the [tex][/tex] tags.
The problem is users will need to enter their input as \sqrt2 etc. and I don't think they will want to learn this syntax
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 »

That is something to address with your users. :|
Muggins
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [ALPHA] MathJax phpBB Integration

Post by sergio91pt »

engines wrote:Is there a way to have math input on a phpbb forum without knowing LaTEX syntax?
If you really must, have a look at this equation editor and the associated tutorial.
Paata
Registered User
Posts: 7
Joined: Sun Aug 15, 2010 3:30 pm

Re: [ALPHA] MathJax phpBB Integration

Post by Paata »

Today I opened my forum and I saw that all math formulas do not display. I do not know what has happened. Instead of formulas there is only written

Code: Select all

[math]
Does somebody know what should I check in order to find out what has happened?

Well, I have phpbb 3.0.11 and I am using mathjax CDN.
Here is a sample what I see as I write

Code: Select all

[tex] x^{2} [/tex]
http://math.ge/forum/viewtopic.php?f=31&t=656

And one more question: I actually forgot where I have indicated
mathjax CDN: http://cdn.mathjax.org/mathjax/latest/M ... _HTMLorMML
Can somebody remind me where this address is indicated in my forum? I just want to check that I indicated it correctly. Probably I indicated this address during the instalation of the MOD, but I don't remember because I intalled this MOD few months ago :(
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [ALPHA] MathJax phpBB Integration

Post by sergio91pt »

Paata, it seems MathJax changed their CDN provider.
The HTTP url remains the same, however the HTTPS url was changed.
I'll push a new version ASAP. In the meantime you can disable "force HTTPS" in the mod settings (.MODS category).

The new SSL URL is:

Code: Select all

https://c328740.ssl.cf1.rackcdn.com/mathjax/latest
Btw you're using

Code: Select all

config=TeX-AMS-MML_HTMLorMML
(just checked the page source), it can be changed in the CP.
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [ALPHA] MathJax phpBB Integration

Post by sergio91pt »

v0.2.3:
  • Updated the HTTPS URL of MathJax's CDN.
  • Updated UMIL from v1.0.4 to v1.0.5.
  • Updated MODX from v1.2.5 to v1.2.6.
  • Updated the Mod version check URL.
Download v0.2.3
mathdlir
Registered User
Posts: 36
Joined: Thu Jun 27, 2013 10:08 am

Modify MathJax Style

Post by mathdlir »

When mathjax is processing there is big padding inline text. and after loading completely padding get out and is nice.

Where can change text-align and direction of MathJax css selector?
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: Modify MathJax Style

Post by sergio91pt »

mathdlir wrote:When mathjax is processing there is big padding inline text. and after loading completely padding get out and is nice.

Where can change text-align and direction of MathJax css selector?
To override MathJax CSS, you need to add the rules in JSON notation on the MathJax.Hub.Config() call.
You should edit styles/prosilver/template/mathjax.html.

Example:

Code: Select all

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    "HTML-CSS": {
        styles: {
            ".MathJax": {
                "text-align": "center",
                "direction": "rtl",
            },
        },
    },
    // ...
});
// ...
</script>
If you want to style the preview text, you can add CSS rules directly in the theme. The class is MathJax_Preview.
mathdlir
Registered User
Posts: 36
Joined: Thu Jun 27, 2013 10:08 am

Re: [ALPHA] MathJax phpBB Integration

Post by mathdlir »

Thank Citromon. How to put equation in center. [latex] is for inline equations?
for example in some boards $ is for inline and $$ is for display equation (new line in center).

How can we do this in MathJax MOD?
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [ALPHA] MathJax phpBB Integration

Post by sergio91pt »

mathdlir wrote:Thank Citromon. How to put equation in center. [latex] is for inline equations?
for example in some boards $ is for inline and $$ is for display equation (new line in center).

How can we do this in MathJax MOD?
  • Go to .MODS->Mathjax->BBCode Settings and create a new BBCode.
  • Now go to Posting->Messages->BBCodes and edit that bbcode HTML replacement code.
  • Find: <span class="MathJaxBB">
  • Replace with: <span class="MathJaxBB" style="display:block;text-align:center;">
Note that the BBCode must be created through the MathJax settings or it won't be recognized as a math bbcode.
mathdlir
Registered User
Posts: 36
Joined: Thu Jun 27, 2013 10:08 am

Re: [ALPHA] MathJax phpBB Integration

Post by mathdlir »

How can we disable MathJax for a specific paragraph?
Locked

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