MetaPost terminal



Hi,

I am am trying to use Dia with ConTeXt, which is a macro package for
TeX. The only TeX-related export options are LaTeX PGF, TeX MetaPost
and TeX PSTricks.

LaTeX PGF, as the name suggests, outputs LaTeX-centric code. That's
unfortunate since PGF is working perfectly fine in ConTeXt.

TeX PSTricks is not an option, since it also outputs LaTeX code and
PSTricks is not supported in ConTeXt.

ConTeXts native graphics format is MetaPost. But sadly also the
MetaPost export outputs LaTeX code, which renders it useless for
ConTeXt.

How can this be solved? One option would be to strip all LaTeX code
from the export. This would perhaps mean losing features. I have no
idea how font handling works in LaTeX, but I doubt that there's a
solution that works equally well for LaTeX and ConTeXt.

Another option would be to provide a dedicated ConTeXt version,
which in turn means that two MetaPost versions need to be kept in
sync, LaTeX MetaPost and ConTeXt MetaPost. The latter is what
gnuplot did, by the way.

I was able to use the MetaPost export in ConTeXt with some little
tweaks (I tested only simple diagrams, the list might be
incomplete):

1) Remove LaTeX header
2) Remove LaTeX font handling, change to plain btex â etex
3) Explicitly declare numerics: numeric x,y,t

The last change would be compatible with LaTeX, the first one would
probably break it and the second one would prevent font changes from
being propagated to LaTeX.

What's your thoughts on this?

Marco

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]