[metapost] [SOLVED] Getting SVG and EPS output from Metapost

Taco Hoekwater taco at elvenkind.com
Fri Mar 14 15:49:28 CET 2014


Hi Dirk,

On 03/14/2014 03:30 PM, Dirk Laurie wrote:
>> Maybe the full list is not there because of the rapid changes lately.

Anyone willing to help improve the man page is very much
invited to do so. Just pointing to mpman.pdf is probably
good enough?

Personally I know next to nothing about troff input, and I think I got
the current man page source from some kind contributor in the first
place.

> For SVG output:
>
> $ mpost -s 'outputformat="svg"' code.mp
>
> Then rename `code.1` etc to have extension .svg.

Adding

   -s 'outputtemplate="%j-%c.%o"'

creates code-1.svg directly


> For EPS output:
>
> $ mpost  code.mp
>
> Then feed `code.1` etc to eps2eps, saving the output to
> files with extension .eps.

mpost -s 'prologues=3"' -s 'outputtemplate="%j-%c.%o"' code.mp

creates code-1.eps which is not only proper EPS, but also
has any used font glyphs embedded.

Best wishes,
Taco




More information about the metapost mailing list