Giter VIP home page Giter VIP logo

mif2mml's People

Contributors

mirod avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

chrispy-snps

mif2mml's Issues

"cannot process y offset" messages occur during conversion

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.

conv_issue.zip

Special character "char[phi]" is translated to the wrong phi character

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

'Can't locate object method "set_from"' errors cause conversion to fail

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.)

mif_issue.zip

To reproduce, unpack the archive, move to the directory, and type make.

MathML schema validation fails for some equations

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.

validation_issue.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.