When writing (e.g. techical reports) in Microsoft Word (or another text processor), I often produce figures as image files using a range of different programs. These programs can be

  • matplotlib (Python)
  • Inkscape
  • Excel

and all sorts of other software with custom plotting tools.

One can often select font face and size in these tools. But when saving figures as image files and inserting them into a Word document, font sizes (and also thickness of lines and similar) depend on image resolution and is unrelated to the document. I am looking for some tips or solutions that will make the quality of my documents resemble TikZ figures in LaTeX. TikZ figures keep line thicknesses and font size constant when scaling.

How can I make graphs and figures that match the graphical style in my Word document?

  • Hey man. I'm also looking for a good workflow to do this. Have you since gotten something that works? – Jonny Apr 11 '16 at 10:16

AFAIK, Microsoft just hasn't done anything like this. The only vector formats they support are enhanced metafile (.EMF), Windows enhanced metafile (.WMF), and extended-postscript (.EPS). (I recall SVG support, but I think you may need to download a plugin from Microsoft for it)

Your best bet is to export from your aforementioned tools to the .EPS format, since you can modify which system font is used in text (as well as line widths) from a simple text editor. While it is not a trivial task to go through all the line widths and fix them, you can easily make font and colour changes using an external text editor, or write a small program/batch file to make the replacements for you.

While this is a less then ideal solution, it does allow you to create your figures, then create your document, and then do a little of post-completion work to simply find-and-replace the fonts in the .EPS to match them with your document choices.

As a final note, when working with vector graphics formats in Microsoft Office, if the image quality appears sub-par, try viewing the document from "Print Preview", or saving it as a .PDF, and proofing it like that. Sometimes, aliasing occurs to increase rendering speed when working on documents.

| improve this answer | |
  • While looking into the SVG support for Word you mentioned, I found out that one can copy directly from Inkscape into Word and get embedded vector graphics. It could be a good solution to generate vector graphics with the various mentioned tools, open them in Inkscape, resize and adjust sizes and line widths and then copy into Word. But I can't seem to make the sizes match up when copying. And Inkscape cannot define font sizes in points. – Bjørnar Mar 7 '12 at 13:07
  • Also, saving .eps files in Inkscape and importing them in Word makes all the text disappear. When re-importing into Inkscape the text shows up, but with a "font not found" warning. – Bjørnar Mar 7 '12 at 13:16
  • @Bjørnar if you're comfortable, open the .EPS file with a text editor of your choice, and see if you can find the name of the font you used. You should be able to replace it with something that Word uses (like Calibri or Cambria) by simply changing the text in the .EPS file, and saving it. I'm not too familiar with Inkscape, but you might be able to accomplish the same thing using that. – Breakthrough Mar 7 '12 at 13:19
  • I cannot find the name of the font in the EPS file saved from Inkscape. And anyway, I selected a font that's available in both Inkscape and Word, so it seems my font choice gets lost when saving the file. – Bjørnar Mar 8 '12 at 10:27
  • Your answer made me realize that what I want is a good way to edit vector graphics and insert them into Word. Googling gave me this tip about pstoedit. Installed that through Cygwin, but every file it produces has errors when importing into Word... – Bjørnar Mar 8 '12 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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