getting ASCIIMath started

11 views
Skip to first unread message

user#9

unread,
Oct 19, 2009, 2:41:25 AM10/19/09
to ASCIIMath
Hi All,

ASCIIMath is very nice, however I've noted that the first time I use
it, I have to follow the last quote with a space. If my first use is
`sigma`-algebra for example, it won't display properly.

David Lippman

unread,
Oct 19, 2009, 12:21:53 PM10/19/09
to ASCIIMath
Interesting. That change must have been made in the 2.0 version, and
I have no idea what the reasoning was. Perhaps there was a desire to
not have the math renderer trigger if the backtick was used as an
apostrophe, like "can`t".

If you wanted to change this, look for the AMprocessNode function.
Near the end of the function, you'll see a conditional that reads:

if (st==null || /amath\b|\\begin{a?math}/i.test(st) ||
st.indexOf(AMdelimiter1+" ")!=-1 || st.slice(-1)==AMdelimiter1
||
st.indexOf(AMdelimiter1+"<")!=-1 || st.indexOf
(AMdelimiter1+"\n")!=-1) {

You can remove the need for a trailing space if you change the first
condition on the second line to just read
st.indexOf(AMdelimiter1)!=-1

-David
Reply all
Reply to author
Forward
0 new messages