Contents | Start | End | Previous: KB0160: How do I add or remove automatic heading numbering? | Next: KB0162: Why are there blank pages or lines in my ODT file?


KB0161: How to import equations/maths into Jutoh

Word and LibreOffice/OpenOffice do not export sufficient information for equations and maths to be imported into Jutoh automatically. Word only exports its proprietary equation format, and LibreOffice/OpenOffice exports MathML which cannot be interpreted directly by Jutoh and by most ereaders. So if you import equations from a DOCX file, there will be blanks where the equations should be, and if you import from an ODT file, 'drawing' objects will be inserted containing only MathML.

If you have Word, you can copy an equation and then paste it into Jutoh. It will show as a bitmap, although it's actually been inserted as a drawing object containing both the bitmap and MathML. Word exposes more formats via copying and pasting than it does in the DOCX file, which is why you get better results from copying and pasting. However, Word may add wide margins to the equation bitmaps so they may need cropping. The Crop images command in Format | Book | Formatting Cleanup will automatically crop all PNG, GIF and TIFF images, and it will also reset the image sizes which will be too large.

A useful trick is to save your Word file as a filtered web page. This creates PNG files for the equations, and then you can either insert these bitmaps into your Jutoh project individually, or import from the HTML file directly. However, the images are not very high-resolution, so for best results you may need to zoom in within Word and take a screenshot.

The commercial Word add-in Kutools will convert equations to images on Windows (not Mac), for easy import from the DOCX file. Remember to save a backup of your Word file if you do this. Also, the problem with wide margins will occur with this method so cropping with Format | Book | Formatting Cleanup / Crop images may still be necessary.

On Mac, you can try saving the file as a web page and importing the resulting PNG files. Another approach is to use a commercial equation editor such as Equation Maker that exports to PNG. Then import or paste the PNG files into Word or Jutoh.

Or, use a service that can convert expressions to MathML, for example www.mathmlcentral.com/Tools/ToMathML.jsp. Then paste the MathML into a drawing object, or, if the target ebook won't support MathML, use www.mathmlcentral.com/Tools/FromMathML.jsp to render an image that can be pasted into Jutoh.

Some options for converting Word equations to images are summarised at www.extendoffice.com.

There are discussions of Word, MathType and MathML on MSDN and at David Carlisle's blog.

Bitmap versions of your equations will be the most compatible, but SVG versions will look better where supported. Use MathML only when you are sure your audience is using a suitable Epub 3 reader.

For more information about converting your equations to SVG and MathML, please see Working with drawing objects in the Jutoh manual.


Contents | Start | End | Previous: KB0160: How do I add or remove automatic heading numbering? | Next: KB0162: Why are there blank pages or lines in my ODT file?