transpect / mathtype-extension

Calabash extension step to convert MathType OLE objects to MathML
19 stars 7 forks source link

Can't convert when <color_range> element is parent of <slot> element #19

Open langtu200987 opened 2 years ago

langtu200987 commented 2 years ago

I has a mtef xml: `<?xml version="1.0"?>

5 1 0 7 4 DSMT7 block WinAllBasicCodePages 5 Times New Roman 3 Symbol 5 Courier New 4 MT Extra 0 8 2 1 2 15 4 5 8 15 4 4 2 15 4 1 5 0 15 4 1 0 0 15 4 7 5 15 4 1 5 0 15 2 1 15 30 4 1 5 0 15 4 1 5 0 15 4 1 0 0 15 4 4 5 15 4 2 5 15 4 8 15 4 2 5 15 4 1 0 0 15 4 1 0 0 15 4 3 5 15 4 1 0 0 15 4 8 15 4 5 15 4 2 10 5 15 4 8 15 4 8 15 4 1 0 0 15 4 1 0 0 15 4 0 15 4 8 15 4 1 7 15 4 8 15 4 1 0 0 15 4 1 2 10 5 15 4 4 5 15 4 5 15 4 5 15 4 5 15 4 5 15 4 1 0 15 12 1 0 1 0 1 2 2 2 2 0 2 0 1 1 1 0 3 0 1 0 4 0 0 0 tmARC 0 0 4 1000 0 0 Red 1 3 0x0041 0 mathmode 3 0x0042 0 mathmode 0 3 0x0043 0 mathmode 22 0x2322 0 mathmode tmSUM tvBO_SUM 0 4 0 0 1000 Blue 2 0 8 0x0033 0 mathmode 8 0x0033 0 mathmode 8 0x0033 0 mathmode 0 1 1 6 0x2211 4 229 mathmode

`

After run xlst transformation with mode 'color-range' `

` => it will transform to: ` 4 255 0 0 Red 1 4 0 0 255 Blue 2 5 1 0 7 4 DSMT7 block WinAllBasicCodePages 5 Times New Roman 3 Symbol 5 Courier New 4 MT Extra 0 8 2 1 2 15 4 5 8 15 4 4 2 15 4 1 5 0 15 4 1 0 0 15 4 7 5 15 4 1 5 0 15 2 1 15 30 4 1 5 0 15 4 1 5 0 15 4 1 0 0 15 4 4 5 15 4 2 5 15 4 8 15 4 2 5 15 4 1 0 0 15 4 1 0 0 15 4 3 5 15 4 1 0 0 15 4 8 15 4 5 15 4 2 10 5 15 4 8 15 4 8 15 4 1 0 0 15 4 1 0 0 15 4 0 15 4 8 15 4 1 7 15 4 8 15 4 1 0 0 15 4 1 2 10 5 15 4 4 5 15 4 5 15 4 5 15 4 5 15 4 5 15 4 1 0 15 12 1 0 1 0 1 2 2 2 2 0 2 0 1 1 1 0 3 0 1 0 4 0 0 0 tmARC 0 0 1 3 0x0041 0 mathmode 3 0x0042 0 mathmode 0 3 0x0043 0 mathmode 22 0x2322 0 mathmode tmSUM tvBO_SUM 0 2 0 8 0x0033 0 mathmode 8 0x0033 0 mathmode 8 0x0033 0 mathmode 0 1 1 6 0x2211 4 229 mathmode ` Then i run xlst transformation with: ` ` => it will transform to: ` A B C ` => missing the data ` 2 0 8 0x0033 0 mathmode 8 0x0033 0 mathmode 8 0x0033 0 mathmode ` I am new with xslt so I don't know how to change xslt to fix it. :(. Help me please. Thank you.
mkraetke commented 2 years ago

The mathtype-extension supports no color information from MathType. If you're new to XSLT, then it might be a bit too complicated to dig to our code and implement it yourself. So you have either wait until one of our customers pays for this feature or you may persuade your company to pay for it.

langtu200987 commented 2 years ago

@mkraetke Thank you for your response. I will work around by adjusting XML by my code instead of XSL before pass it to pipeline IMO :(.