View Single Post
Old 12-01-2018, 02:18 AM   #20
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by Tex2002ans View Post
1. Can only Copy/Paste out MathML in newer versions of Word (>2007?), when they introduced the newer Equation Editor. I think you can only copy/paste one-at-a-time.......

When you open your DOCX with equations + Save As HTML, Word exports tiny PNGs. (According to what I know you don't even have control over final image size, etc.)

Toxaris can probably pop in and explain details... (I think automated MathML export is only available via APIs and can't be exported directly within Word?
You are almost right, it was introduced in Word 2010, but you need to activate/set this. You can choose if you want to copy an equation as MathML or in Linear format. Internally MS uses oMath, an extension of their OOXML standard. There is a resemblance to MathML, but it is not the same of course.
There is no built-in way to export only the equations. As you mention, Save as HTML will export them as PNG files.
There is no way to export MathML automatically via APIs.

Quote:
Originally Posted by Tex2002ans View Post
2. Toxaris's EPUBTools can also export MathML+SVG for you. This is the easiest/best way I know of currently.
Thank you. You can actually choose if you want MathML, SVG or both. I start from the MathML and create an SVG from that. There are some things that can be configured (like font and sizes), but not native from the GUI. That is because I rely on another program for the conversion. It is reasonably easy to convert those SVG or MathML to PNG. I am working on making PNG also an option, but not the PNG delivers by Word. Those are tiny and not that good.

Quote:
Originally Posted by Tex2002ans View Post
The subpar thing about those two workflows is that all the equations will be numbered sequentially:
  • image001.png for Word.
    • (I'm assuming equation images will get smushed together with normal images?)
  • Equation001.mml + Equation001.svg for EPUBTools

When you fully control the entire workflow from the start, you can give each equation human-readable names (VERY important when going to edit/add/change books in the future), and can control ALL the variables separately:
  • Font
  • DPI
  • Mathematical formatting conventions
    • Bold or italic vectors
  • [...].

This allows you to easily regenerate whatever materials you need.
Agree. The biggest issue is that equations within Word are not named, that metadata is not there. It is just a collection. Therefore I had to number them to make the process automatic. It is not ideal, I agree.
And you are right, if you have equations and images in Word, the Save as HTML function in Word will just rename the bunch of them as imagexxx.png as they appear in the text. Good luck in identifying...

My process is not ideal, but in my opinion an improvement. That being said, I don't believe most academics use Word with equations. Even if they did, it would be niche and therefore not very interesting to improve upon.
Toxaris is offline   Reply With Quote