mirod / mif2mml Goto Github PK
View Code? Open in Web Editor NEWA tool to convert equations in (FrameMaker) MIF format to MathML
License: GNU General Public License v3.0
A tool to convert equations in (FrameMaker) MIF format to MathML
License: GNU General Public License v3.0
When I convert these two equations, I get "cannot process y offset" messages from conversion:
./mif2mml.pl "hs4_258_scr.mif" 2>&1 | tee "hs4_258_scr_mml.out"
cannot process y offset -589824 (-9 pt)
cannot process y offset -589824 (-9 pt)
cannot process y offset -524288 (-8 pt)
./mif2mml.pl "hs3_298_scr.mif" 2>&1 | tee "hs3_298_scr_mml.out"
cannot process y offset -163830 (-2 pt)
cannot process y offset -185674 (-2 pt)
A testcase is included. To run, type make
.
The FrameMaker equation palette has three phi characters. The current character translation mapping in mif2mml
is as follows:
char[Phi] - U+03A6 : GREEK CAPITAL LETTER PHI
char[phi] - U+03C6 : GREEK SMALL LETTER PHI <-- same as char[varphi]
char[varphi] - U+03C6 : GREEK SMALL LETTER PHI
The correct mapping (by physical appearance) is:
char[Phi] - U+03A6 : GREEK CAPITAL LETTER PHI
char[phi] - U+03D5 : GREEK PHI SYMBOL <--- fixed
char[varphi] - U+03C6 : GREEK SMALL LETTER PHI
In this testcase, three MIF equations cause conversion to fail with the following errors:
./mif2mml.pl "pp_b65.mif" 2>&1 | tee "pp_b65_mml.out"
Can't locate object method "set_from" via package "<mo>*</mo>pelt=HASH(0x7fffcd52ebd8)" (perhaps you forgot to load "<mo>*</mo>pelt=HASH(0x7fffcd52ebd8)"?) at (eval 38) line 2737.
./mif2mml.pl "pp_b60.mif" 2>&1 | tee "pp_b60_mml.out"
Can't locate object method "set_from" via package "<mo>*</mo>pelt=HASH(0x7fffe30ca370)" (perhaps you forgot to load "<mo>*</mo>pelt=HASH(0x7fffe30ca370)"?) at (eval 38) line 2737.
./mif2mml.pl "pp_b66.mif" 2>&1 | tee "pp_b66_mml.out"
Can't locate object method "set_from" via package "<mo>*</mo>pelt=HASH(0x7fffde0c5528)" (perhaps you forgot to load "<mo>*</mo>pelt=HASH(0x7fffde0c5528)"?) at (eval 38) line 2737.
(Note that I am using a modified version of mif2mml which applies a particular meaning to "newfunction"; this hack must be propagated to your working copy to debug.)
To reproduce, unpack the archive, move to the directory, and type make
.
When I validate the converted equations against the MathML schema (in RelaxNG format), I get schema validation errors:
hs4_209_scr.mml:2:49: error: attribute "mathvariant" not allowed here; expected attribute "align", "class", "href", "id", "mathbackground", "mathcolor", "other", "style" or "xref" or an attribute from another namespace
paragraph13_scr.mml:2:29: error: attribute "displaystyle" not allowed here; expected attribute "class", "dir", "href", "id", "mathbackground", "mathcolor", "other", "style" or "xref" or an attribute from another namespace
px_b44_scr.mml:12:31: error: attribute "displaystyle" not allowed here; expected attribute "class", "dir", "href", "id", "mathbackground", "mathcolor", "other", "style" or "xref" or an attribute from another namespace
A testcase is included. To run, type make validate
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.