Inserting MathJax equations to MS Word?

12,209 views
Skip to first unread message

Pezhman Nasirifard

unread,
Aug 12, 2012, 4:07:47 PM8/12/12
to mathja...@googlegroups.com

I have a page with MathJax equations in it, first I tried to insert the Html form to word by DocX Dll , like below, but it didn't work and I tried to insert MathMl but that didn't work as well, how can I do this? I'm using DocX dll in Asp.Net MVC 3 now for manipulating words but is there a better dll? thanks

public void ConvertToWord(string html)
   
{
       
using (DocX document = DocX.Create(@"C:\docs\Equations.docx"))
       
{
           
Paragraph pEquation1 = document.InsertEquation(html);                              
            document
.Save();                
       
}
   
}

Davide P. Cervone

unread,
Aug 13, 2012, 1:05:21 PM8/13/12
to mathja...@googlegroups.com
I'm not certain I understand what you are trying to accomplish.  Are you trying to copy the MathJax HTML-CSS output into a word document?  That is not likely to work very well.

I think your attempt to use the MathML is the right one for this.  My understanding is that you can use the MathJax contextual menu (right-click on an equation), select Show Math As -> MathML, then copy the MathML that is shown in the pop-up window.  You should be able to paste that into the Word document.  I think the video at


explains how to paste MathML into Word (there is a paste option that you need to use, apparently).  The video is a bit old (the MathJax contextual menu has changed a bit), but the essence is correct.  Give that a try and see if that works.

Davide

ngian...@metricarts.com

unread,
Mar 15, 2013, 12:12:11 PM3/15/13
to mathja...@googlegroups.com, epez...@gmail.com
Hi, i´m actually triying to do the exact same thig but with no succes.
Did you, eventually, found a way to do this? Any help would be great, thanks!

Paul Topping

unread,
Mar 15, 2013, 12:26:49 PM3/15/13
to mathja...@googlegroups.com, epez...@gmail.com, Technical Support

Hi,

 

I’m not sure exactly what you are trying to do but here’s a couple of things that might help:

 

You can copy MathML from a MathJax-rendered equation in a web page by copying its MathML to the clipboard and pasting it into MS Word. My company’s website has some information that may help with this:  http://www.dessci.com/en/support/MathType/works_with.asp#!target=microsoft_word. This should work without you having to purchase MathType.

 

MathType also has a Save as MathPage feature that let’s you save a MS Word doc as an HTML web page where the equations are rendered using MathJax. This feature does require purchase of MathType but we have a 30-day trial.

 

I hope this helps.

 

Paul Topping

Design Science, Inc.

"How Science Communicates"

Makers of MathType, MathFlow, MathDaisy, MathPlayer, Equation Editor

http://www.dessci.com

 

--
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.
 
 

car...@gmail.com

unread,
Oct 1, 2013, 6:26:18 AM10/1/13
to mathja...@googlegroups.com
Davide,

This behaviour of mathjax is wonderful. I hope it will help me to get my equations back and forth between mathml and latex more easily. Thanks for you work on this.

I have a question though, to insert the text into word I have to add
<?xml version="1.0"?>
at the top of the copied text for it to paste into word successfully. This is a lot of extra clicks. Could there be an option to copy the mathml text including this tag? My lack of understanding measn I don't know what this tag even really means.

With the tag though, the copying works a treat!

car...@gmail.com

unread,
Oct 1, 2013, 6:27:43 AM10/1/13
to mathja...@googlegroups.com, car...@gmail.com

Peter Krautzberger

unread,
Feb 12, 2014, 5:37:36 PM2/12/14
to mathja...@googlegroups.com, car...@gmail.com
Hi,

Have you tried the paste-special method described in the video at http://www.mathjax.org/demos/copy-and-paste/? That should work without the extra line.

Regards,
Peter.




rohit....@gmail.com

unread,
Apr 2, 2014, 6:35:33 AM4/2/14
to mathja...@googlegroups.com, epez...@gmail.com
I m building a website in ASP.NET with c#!! I need a plugin with which i can enter the formula in the webpage

fbba...@gmail.com

unread,
Sep 18, 2017, 12:50:06 PM9/18/17
to MathJax Users
On Monday, August 13, 2012 at 1:05:21 PM UTC-4, Davide Cervone wrote:
I'm not certain I understand what you are trying to accomplish.  Are you trying to copy the MathJax HTML-CSS output into a word document?  That is not likely to work very well.

I think your attempt to use the MathML is the right one for this.  My understanding is that you can use the MathJax contextual menu (right-click on an equation), select Show Math As -> MathML, then copy the MathML that is shown in the pop-up window.  You should be able to paste that into the Word document.  I think the video at


explains how to paste MathML into Word (there is a paste option that you need to use, apparently).  The video is a bit old (the MathJax contextual menu has changed a bit), but the essence is correct.  Give that a try and see if that works.

Davide

Unfortunately your link no longer works: it just takes one to the home page of MathJax, and then there is no obvious way to find the demo.  None of the links on the home page look useful.

Peter Krautzberger

unread,
Sep 19, 2017, 4:25:58 AM9/19/17
to mathja...@googlegroups.com
Hi.

The relevant content is now in the pop-up "accessible and reusable".

Regards,
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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel

unread,
Mar 3, 2018, 12:15:28 AM3/3/18
to MathJax Users
Hi,

I didn't manage to copy and paste MathJax formulas into Word. And the link explaining it in detail is apparently broken. Does that still work? If so, a permanent step by step guide would be much appreciated.

Regards,
Daniel
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.

Peter Krautzberger

unread,
Mar 3, 2018, 8:09:49 AM3/3/18
to mathja...@googlegroups.com
Hi Daniel,

The last link in the section https://www.mathjax.org/#a11y is points you to https://youtu.be/VBt0Qeq5GWw. It's an old screencast but still accurate.

Peter.

To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.

Daniel

unread,
Mar 3, 2018, 7:18:33 PM3/3/18
to MathJax Users
Hi Peter,

Thanks. Works great. I was hoping that one can also just copy and paste the html content of the MathML from the browser to word but unfortunately that seems not to work...

https://codepen.io/anon/pen/VQNVOz?editors=1010#0

Daniel

alej...@gmail.com

unread,
Apr 6, 2018, 8:07:39 AM4/6/18
to MathJax Users
If you use OSX, you can use Pages ("Apple's version of Word") You can write Mathjax directly into the page by pressing "cmd+alt+E", or selecting "Insert\Equation" from the menu bar. 
Almost all mathjax syntax, colours and format are accepted and very easy to use.

Also, if you American Mathematical Society's (AMS) Fonts, your docs look like they're Latex Docs. Very useful and looks professional for presenting mathematical/scientific papers. 
If you're doing heavy-publishable work, still recommend just using Latex. The MsWord solution described earlier is rather user-unfriendly. Just Use LaTeX Software.

Vijay Deshmukh

unread,
Jun 10, 2023, 1:59:44 PM6/10/23
to MathJax Users
Though it's too late. Found good method here. https://youtu.be/RP5z8DHpcnI
See method 3 Latex -> MathML->Word

Reply all
Reply to author
Forward
0 new messages