Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Thanks thinkhy. It could be you extracting the data incorrectly (we haven't looked at your script yet). Only one of your GIFs had MathML -- the one that has a file name starting 106R. In that one, if you just grab all the bytes from the first bit that looks like MathML until the end, you do periodically get odd bytes in there, mostly 255's except the last one. (This however doesn't appear to be the junk character you're seeing.) The reason for the 255's is that the MathML is distributed over multiple comment records, each one of which starts with a count of the bytes in the record. From the MathType SDK (free download; link below):</p> <hr> <p>GIF Image Files</p> <p>MathML text is embedded into a GIF file as an Application Extension Record, which consists of a 14-byte header (Application Extension Descriptor), followed by the MTEF data. The header contains:</p> <pre><code>Byte Introducer = 0x21; Byte ExtensionLabel = 0xFF; Byte BlockSize = 0x0B; Byte ApplicationId[8] = "MathType"; Byte AuthenticationCode[3] = "003"; </code></pre> <p>The data follows this header and is written as a series of blocks each containing 255 bytes or less. Each block starts with a single byte count followed by the data. The end is marked as a block with length 0.</p> <p>The header is unique enough that the easiest way to extract the data might be to scan the file for the 14-byte header, then expect the MathML data blocks to follow. Properly decoding the GIF records isn't that hard either, but obviously requires you read the GIF specification.</p> <hr> <p>You may already be using the SDK, but you didn't say whether you were or not, so here's the link: <a href="http://www.dessci.com/en/reference/sdk/" rel="nofollow">http://www.dessci.com/en/reference/sdk/</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload