SMF is a nice web forum package but it doesn’t display mathematics by default. If you want it to render LaTeX, one option is to use mimetex. Here is a quick patch to enable [tex]…[/tex] tags in SMF version 1.1. You can get the latest updates to this patch with:
darcs get http://darcs.superadditive.com/smf-mimetex
Hello Jouan,
many thanks for your work, your extension to the SMF BBCodes plus the super easy to install mimeTEX greatly simplyfies the use of formulas in SMF.
I have two tiny improvement to your tag definition:
1. Many of my users had problems because the did line breaks after the [tex] start tag, so I added a validation code to remove the unwanted ” codes which SMF throws in.
2. I added a ‘title’ attribute to the IMG tag so even Firefox shows the TEX expression when hovering with the mouse over the image, so the users can learn the forumla expressions more easily.
Finally, the code to be inserted in /Sources/Subs.php goes like that:
array(
‘tag’ => ‘tex’,
‘type’ => ‘unparsed_content’,
‘content’ => ”,
‘validate’ => create_function(‘&$tag, &$data, $disabled’, ‘$data = strtr($data, array(\’\’ => \’\'));’),
),
Keep up the good work and greetings from Germany,
Stefan
Hmpf, the IMG tag was suppressed by your blog system. I repeat it, but use [] instead of :
[img src="/cgi-bin/mimetex.cgi?$1" alt="$1" title="$1" border="0" align="absmiddle" /]
Thanks a lot, this is just what I was looking for. I am using this on my new physics forum :)
Stefan’s improvements are also great.
Keep it up, greetings from Poland.
Greg
Thank you very much, Grzegorz!
I am very interested in finding a short BBC equation editor much like the LaTex generators I see.
I know this would be very specialized but I run an aboslutely free chemistry help website
http://www.mychemistrytutor.com
just the edition of being able to add fractions would be most useful
how far away do you believe an in forum equation editor is?
Hello Jeff,
I wrote the smf-mimetex patch with LaTeX-savvy users in mind so I’m afraid I can’t provide you with an estimate for what you ask.
I wish you good luck in your search!
Jeff,
I found one here : http://test.izyba.com/equationeditor/equationeditor.php
There is a download link in the footer.