开发者

Extracting Math Formulas out of TeX / MetaFont

I have used LaTeX. 开发者_C百科I have used TexMacs.

What I want -- is to somehow be able to rip the "font/characters" out of MetaFont, and then arrange them myself (using an algorithm different from TeX).

This brings up the questions:

(1) what is the output format of MetaFont? (2) How can I get Tex/LaTeX/MetaFont to dump out all the math characters? (3) How can I get these math formulas represented as some type of vector graphics (i.e. curves), as well as the statistics on the charaters (baeline, width, height, ...)

Thanks!


The output format of METAFONT is the generic font (gf) format. If you have a current TeX system installed, texdoc gftopk should give you the documentation of a converter from gf to the pk format finally used by most DVI processors, as well as pdftex (if they don't use TrueType or PostScript fonts instead). This manual contains a description of this format, too.

Instead of interpreting the GF format, you may think about interpreting the PK format instead, it is claimed to be "easier to convert into a raster representation" (and its description is in the same manual, too.)

If you don't want to do this conversion yourself, you can go one step further - there is as part of the netpbm bundle a program named pktopbm, which allows you converting individual characters of a font to bitmaps (other programs of this bundle allow you converting from pbm to any bitmap format you may wish for).

Additionally to the actual character bitmaps you would need the font metrics - TeX uses them in the TFM format, which is also output by metafont. Its format is described (as well as the other formats mentioned) in the document The DVI Driver Standard, Level 0, to be found on CTAN.

So, then you only need to look which fonts are math fonts, and here you go.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜