I wanted to use jsMath in my Invision Power Board, but the only thing is IPB converts \ to its HTML entity (& #092;). A good thing, when you look at what someone could do by using \ (having a poster closing a <div> and your layout looks... quiet different), but it's also very necessary when using TeX. Is there a way to get jsMath to parse & #092; as if it were \?
Thanks in advance,
Davide P. Cervone
My tests all show that jsMath already DOES handle this entity name properly. Can you tell me what version of jsMath you are using, and what browser you are testing it from? Can you send a snippet of the HTML that is being produced by IPB that includes some mathematics (and a bit of surrounding text)?
PS, note that to end a <DIV> tag, you would need to use / not \ as it is </DIV> not <\DIV>. In any case, if the users can enter tags, they can mess up the display without needing /, as they could add EXTRA <DIV> tags, for example, which would be just as damaging. IPB probably converts \ to an entity because \ is used by whatever language underlies it as a special character in strings and it is trying to avoid having it change the meaning of the following character (or characters) accidentally.
You are truly right about the \-thingy! I downloaded jsMath a few days ago, and it should be 3.4d. Just to be sure, I re-uploaded the files.
It seems to work on a less big piece of HTML nicely (I've tried it out on the next piece of HTML too:
This is a tryout and this should still be text! <div class="math">a \vee \neg a = \top</div>
However, this should be processed: <div class="math">a \vee \neg a = \top</div>
but there it worked in both cases, also in the case where tex2math_ignore should prohibit it from doing so. Tested on Firefox 126.96.36.199 at Linux and Windows, and on Internet Explorer ).
Although, when I use it on a larger piece (710 lines, 33.4 KB) which has, when you only look at the tags which should matter to jsMath, a more simpler content (removed the tags with class="tex2math_ignore" and class="tex2math_process". Whole generated page available at http://wumpwump.nl/might_be/working.html (the jsMath related tags appear at lines 18 and 347)
Now when I got someone to check it on a Windows computer, it did work on Internet Explorer at Windows. However, it didn't work on Firefox at both Linux and Windows; the grey bar at the left lower corner keeps telling it's loading. How long you wait doesn't seem much of a factor; after more than an hour it's still loading.
I'll try to see what I can do from here, but it might harder for me since I don't have your full site.
I have confirmed that you are using version 3.4d, so you have that correctly installed.
Unfortunately, however, you have a misunderstanding of the way that tex2math_ignore works. That ONLY controls the action of the tex2math plugin, not jsMath itself. That plugin searches the HTML page for TeX and LaTeX math delimiters and converts them to <SPAN CLASS="math"> and <DIV CLASS="math"> so that jsMath will be able to process the TeX. The tex2math_ignore marker only affects that translation process, not the action of jsMath. Any SPAN or DIV marked as CLASS="math" with be processed by jsMath, which is what you are seeing.