News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Subs-editor.php help

Started by jaccione, October 12, 2010, 12:51:46 AM

Previous topic - Next topic

jaccione

Hi, I am trying to add an extra bbc button function for a LaTex/mimetex mod in the forum.

the mod array looks like this and works just fine:
array(
'image' => 'tex',
'code' => 'tex',
'before' => '[tex]',
'after' => '[/tex]',
'description' => $txt['latex']
),


what i would like to do is add another button with a further defined option  for colour font formatting so that the 'before' text reads as '[tex]\color{blue}' and the after would remain the same '[/tex]'

I think the forward slash is crashing subs-editor though??

array(
'image' => 'tex',
'code' => 'tex',
'before' => '[tex]\color{blue}',
'after' => '[/tex]',
'description' => $txt['latex']
),


I am not sure how to escape it, or if that is even the problem. Any ideas appreciated.  I am running 2.0RC3 with the mimetex mod
thanks
www.math.net.au for all your math homework needs

Oya

try that line as

'before' => '[tex]\\color{blue}',

jaccione

Thanks so much, that worked a charm

I knew it had to be simple!!
www.math.net.au for all your math homework needs

Advertisement: