1
$\begingroup$

I want to put my table output into an MS Word document without having to edit it in word after, so I want to export it ready for Word in final version with complete legends and title. Is it possible to do that in Mathematica 9? After getting table output, what procedure should I follow to put it into Word?

I want to set alignment in my Math file and export in Word document. Here is example of what I to do when I have big matrix.

  Table[N[1/(i + j)], {i, 1, 10}, {j, 1, 10}] // MatrixForm
$\endgroup$
2
  • $\begingroup$ tug.org/utilities/texconv/textopc.html $\endgroup$ Commented Jan 14, 2013 at 13:31
  • $\begingroup$ I would export as EPS, place the EPS file into Word, and print the Word document to PDF using Adobe Acrobat Distiller... Ideally, if I had the choice, I wouldn't use Word at all, but that's another story. $\endgroup$
    – cormullion
    Commented Jan 14, 2013 at 14:43

2 Answers 2

2
$\begingroup$

This "should" work for MS Word (can't test directly). The reason I don't have Word is that everything I want is done better by LyX, and in this case it shines again as a conversion tool.

  • Download LyX (you don't need to install $\TeX$ distribution if you don't want to, the conversion below should work without it. However, you'll be able to enjoy LyX much more if you do follow its installation instructions and install $\TeX$ first.
  • In Mathematica, create your Table or Matrix
  • In the next line, type TeXForm[%]
  • Copy the output as Text
  • In LyX, open a new display equation (Insert > Math > Display Formula)
  • In that equation template, Paste the $\LaTeX$ code you just copied (no need to understand the code at all, just do it). Instantly, the code appears in this form:

LyX

  • Save the file for later use (optional)
  • Go to File > Export > LyxHTML
  • A new file with the same name as your LyX document but extension .xhtml is created
  • Opening this in Firefox or other browser you can verify that the content is correct. It is not an image, but properly formatted XHTML
  • Assuming that MS Word can import XHTML, you should be done now.
  • (Optional) If Word can't import this, throw it away and use only LyX from now on.
$\endgroup$
1
  • $\begingroup$ Thank you very much Jens! Excellent. I didn't know! $\endgroup$
    – Pipe
    Commented Jan 14, 2013 at 18:09
1
$\begingroup$

Another option is the MathML copy & paste approach. Mark the bracket of the output cell (right hand side of the notebook) that contains the matrix and right click, then choose Copy As > MathML

In Word (tested with 2007) I simply paste it with CTRL+V. There will be a drop down menu at the right side of the pasted expression where you can set the appearance to Professional, which gave me the matrix parantheses.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.