Closed (works as designed)
Project:
MathJax: LaTeX for Drupal
Version:
6.x-1.0-beta3
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2012 at 17:48 UTC
Updated:
8 Aug 2013 at 11:30 UTC
I have 2 input formats: "Full HTML" and "Full HTML + Mathjax".
I don't want MathJax to parse the code between the dollar symbol, in any node using "Full HTML" input filter. I haven't checked the "MathJax filter" checkbox in admin/settings/filters/ , but I have some older nodes with dollar symbols, and MathJax is reading everything between those symbols as Latex.
For example: I have $1000 and lost $500
Thanks for your help.
Comments
Comment #1
jpcurley25 commentedThere is a hack around this if you use /$ as an 'escape character' (instead of just $ which will signify the start a LaTeX chunk) to display a dollar sign in HTML instead of starting a chunk for LaTeX to filter. Hopefully this helps.
Comment #2
federico commentedThanks. My site has already >3000 nodes, and it's about economics. There are a lot of $ signs, so it's impossible to go node by node replacing $ with /$.
I think that, if you don't check the "MathJax filter" in admin/settings/filters/, MathJax should be disabled for the nodes that use that filter, plus there is no way to disable it.
I'm changing this into a feature request. Please tell me If I'm wrong.
Thanks anyway.
Comment #3
jpcurley25 commentedI totally agree that the dollar sign is not uncommon enough to make a good tag. New functionality may be in order.
However, have you tried to change the tag that mathjax looks for? If you look at ../modules/mathjax/mathjax.js on lines 27 and 28 shown below, you should be able to change your delimiter from $ to whatever you like. This would make your content far more robust in the future if you are able to implement it without too much hassle.
On my site, I changed the '$' to '+++' on my website and it works fine and since '+++' is very unlikely to appear anywhere else, it makes a good delimiter. Perhaps there is an easy way to change this in all articles without doing it manually using flexifilter's chunk grabber and append/prepend.
Hope this helps!
Comment #4
federico commentedThanks jpcurley! I'll implement your suggestion ASAP. Sure it helps.
Comment #5
cilefen commentedComment #6
cilefen commentedIt is not possible at this stage to configure this properly with the MathJax API. Use jpcurley25's solution.