How can I add special characters, chemical symbols etc??

Re: How can I add special characters, chemical symbols etc??

by Marc Grober -
Number of replies: 5
This example using the Tex filter which you can invoke once you have turned it on

$$^{33}_{17}Cl^{16}\xrightarrow{n,n}~^{31}_{15}P^{16 }+~^4_2He^2$$

is taken from here:

http://www.physicsforums.com/showthread.php?t=9021

Notice that the xrightarrow does not parse as discussed here, http://moodle.org/mod/forum/discuss.php?d=111788#p490607, though a replacement with a vector statement might work. You willl also note that the stacking in front of the C appears to be inconsistent with the display you will see in the pafe I referenced, likely because Moodle uses a tex and not latex filtyer, though I have never found full docs explaining what exactly is going on with the Moodle tex filter.....

However, I would suggest you look at asciimath, which you may find faster and more easy to use and can be invoked from theme as opposed as filter (in fact, I recommend that you not install in filter for reasons posted elsewhere) . If you are interested in ursuing asciimathml install, check out the recent math tools postings and let me know if you need some assistance.
In reply to Marc Grober

Re: How can I add special characters, chemical symbols etc??

by Mauno Korpelainen -

This different syntax is sometimes really annoying but something like

$ $ ^{33}_{17}Cl^{16}\;\stackrel{n,n}{\rightarrow}\;^{31}_{15}P^{16}+~^4_2He^2 $ $ (no space between double dollars)

could do the same job in mimetex:

$$^{33}_{17}Cl^{16}\;\stackrel{n,n}{\rightarrow}\;^{31}_{15}P^{16}+~^4_2He^2$$

In reply to Mauno Korpelainen

Re: How can I add special characters, chemical symbols etc??

by Marc Grober -
But notice that using mimetex in Moodle the 33 and 17 are still not aligned with the 31 and 15 (nor with 4 and 2 for that matter.....) I am looking at what make this pretty in asciimathml as well....

Ahhhh..... here it is, I knew I had seen it somewheres....

`{::}_(\ 92)^238U`

Note that asciimathml simply does not know what to do with leading sub- and superscripts without the initial token.
In reply to Marc Grober

Re: How can I add special characters, chemical symbols etc??

by Marc Grober -
compare using asciimathml:

`{::}_(17)^33 bbCl {::}^16\ \vec{n,n}\ {::}_(15)^31 bbP {::}^16\ +\ {::}_(2)^4bbHe^2`

`{::}_(17)^33 "Cl" {::}^16\ \vec{n,n}\ {::}_(15)^31 "P" {::}^16\ +\ {::}_(2)^4"He"^2`

I discovered that bb is no longer working after installation of the STIX fonts, but either of these will adequately substitute for the tex posted previously.

"\ " is a space. "{::}" is essentially a nullity that allows for the prescript "bb" should embolden text and the quotes escape text from being displayed in italics by asciimath.
In reply to Marc Grober

Re: How can I add special characters, chemical symbols etc??

by Mauno Korpelainen -

Nice example Marc! I tested another version with our "super equation editor" and used some non standard spaces (custom input) with Times New Roman as default font and got equation that looks much cleaner than Tex version $$^{33}_{17}Cl^{16}\;\stackrel{n,n}{\rightarrow}\;^{31}_{15}P^{16}+~^4_2He^2$$ :

(UPS - Cl and U got a little bit messed...big grin)

Attachment chemistry.gif
In reply to Mauno Korpelainen

Re: How can I add special characters, chemical symbols etc??

by Marc Grober -
Oh my..... wild and crazy transmutation! The Alchemists were right! big grin

Thanks for the image as it provides a glimpse for subscribers at some of the new magic buttons.....