One formula in two different paragraphs

已查看 56 次
跳至第一个未读帖子

huudien...@gmail.com

未读,
2013年3月29日 13:08:522013/3/29
收件人 mathja...@googlegroups.com
Hello everybody,

I am using CKEditor in my forum, and it is configured in such a way that an Enter hit will insert a new paragraph. For example, if I type
\begin{array}{cc} 
a & b \\ 
c & d
\end{array}

I will obtain

<p> \begin{array}{cc} </p> 
<p> a & b \\ </p>
<p> c & d </p>
<p> \end{array} </p>

so MathJax cannot recognize it. 

Can anybody please tell me how to make MathJax be able to read the above formula?

I can re-configure the editor to make Enter hits insert <br/> instead of a new paragraph, but this will lead to a malfunction of other features.

Thank you for your help.

Dayal Purohit

未读,
2013年3月29日 13:20:372013/3/29
收件人 mathja...@googlegroups.com、huudien...@gmail.com
You can include the html elements <p>, </p> inside Tex string.

Peter Krautzberger

未读,
2013年3月29日 13:39:412013/3/29
收件人 mathja...@googlegroups.com、huudien...@gmail.com
MathJax will not parse beyond HTML tags, I'm afraid. Perhaps CKeditor has a way to avoid automatic paragraph breaks via a plugin, but I don't know it that well.

Peter.


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

J.R.St...@physics.org

未读,
2013年3月29日 13:49:512013/3/29
收件人 mathja...@googlegroups.com、huudien...@gmail.com


On Friday, March 29, 2013 5:39:41 PM UTC, Peter Krautzberger wrote:
MathJax will not parse beyond HTML tags, I'm afraid. Perhaps CKeditor has a way to avoid automatic paragraph breaks via a plugin, but I don't know it that well.
 
JavaScript executed onload but before MathJax could perhaps be used to remove the paragraph markings.
-- 
  (c) John Stockton, near London, UK.  Using Google, no spell-check.
 Mail: J.R.""""""""@physics.org or (better) via Home Page at
 Web:  <http://www.merlyn.demon.co.uk/> (may move soon)
 FAQish topics, acronyms, links, etc.; Date, Lagrange, JavaScript, ..|

Dayal Purohit

未读,
2013年3月29日 19:49:132013/3/29
收件人 mathja...@googlegroups.com、huudien...@gmail.com
I meant you can not include HTML elements in Tex String.

huudien...@gmail.com

未读,
2013年4月1日 14:35:032013/4/1
收件人 mathja...@googlegroups.com、huudien...@gmail.com
So to conclude: the answer is NO, unfortunately.

Thank you very much for your replies.

Davide P. Cervone

未读,
2013年4月7日 19:40:012013/4/7
收件人 mathja...@googlegroups.com
Note that MathJax WILL allow <br> tags within the mathematics, which it will treat as a newline. That is the ONLY tag that MathJax will process.  So if you can get your editor to produce <br> rather than paragraphs, that should work.

Davide


On Apr 1, 2013, at 2:35 PM, <huudien...@gmail.com> <huudien...@gmail.com> wrote:

So to conclude: the answer is NO, unfortunately.

Thank you very much for your replies.

huudien...@gmail.com

未读,
2013年4月8日 04:27:502013/4/8
收件人 mathja...@googlegroups.com
Thanks, Davide.

Yes, I know that MathJax allows <br> tags within the formulas. I mentioned in the first post that:


I can re-configure the editor to make Enter hits insert <br/> instead of a new paragraph, but this will lead to a malfunction of other features.

Such a re-configuration will lead to a malfunction of the new quote system of the new 3.4 IP Board (that should not be detailed here because this is not an IPB forum :P).


For those interested, by default, CKEditor has the following enter mode configuration:
- Enter will insert a new paragraph (<p> </p>)
- Shift + Enter will insert a new line (<br/>)

To change this, it suffices to modify the enterMode and shiftEnterMode entities in the configuration file as follows

config.enterMode = CKEDITOR.ENTER_BR;
config.shiftEnterMode = CKEDITOR.ENTER_P;


Regards.
回复全部
回复作者
转发
0 个新帖子