Trouble with multiline expressions/equations contained in single MATH element

712 views
Skip to first unread message

M Gozler

unread,
Jan 7, 2011, 7:35:19 AM1/7/11
to ASCIIMath
In my implementation of the Jipsen translator (
http://proteomics.dynalias.org/interactivepages/text2mathmlform.html
*), I am having no luck in expressing multiple lines of equation in a
single <math></math> block. I usually have to do one line at a time
in its own <math> block.

I already use a minor modification of the ASCIIMathML2-0-1.js file
(just added a character). Are there suggestions as to which function
or block in a function for modifying the Javascript to perhaps take a
symbol specifying a newline ('\n' ?) and what markup would be use to
specify the newline ('<br/>'?)

* -- if there is trouble connecting to this URL, I would like to know

David Lippman

unread,
Jan 7, 2011, 7:16:51 PM1/7/11
to ASCIIMath
There might be someway to to multilines in MathML, but my temptation
would be to add a preprocessor that splits the input by newlines,
processes each line individually, and inserts a <br/> between them in
the output.

On Jan 7, 4:35 am, M Gozler <mavigoz...@yahoo.com> wrote:
> In my implementation of the Jipsen translator (http://proteomics.dynalias.org/interactivepages/text2mathmlform.html

Mavi Gozler

unread,
Jan 8, 2011, 2:48:23 PM1/8/11
to asci...@googlegroups.com
Thanks for response.

Your analysis seems to be the correct one.  I have modified the wrapper script code so that each single line in the textarea form control as input is pulled out and then passed one-by-one to the Jipsen code (translator) so that it can generate the <math> node (and from which the MathML markup can be referenced for the  purposes of the form).  All newline ('\n') characters present are then coded as break elements (<br/>) (except any whitespace characters at the end of the input, which are trimmed as needless).   The <math> and <br/> nodes are then appended to a document fragment (or the equivalent for IE browsers).

That seems to be working, although I am in the end stages of debugging this form and its support code.




From: David Lippman <drli...@yahoo.com>
To: ASCIIMath <asci...@googlegroups.com>
Sent: Sat, January 8, 2011 2:16:51 AM
Subject: [ASCIIMath] Re: Trouble with multiline expressions/equations contained in single MATH element
--
You received this message because you are subscribed to the Google Groups "ASCIIMath" group.
To post to this group, send email to asci...@googlegroups.com.
To unsubscribe from this group, send email to asciimath+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/asciimath?hl=en.


Reply all
Reply to author
Forward
0 new messages