mpost: Run 'mpost' on a MetaPost File

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Run mpost on a MetaPost file, possibly with additional options.

Usage

1
2
mpost(file = "fig.mp",
      cmd = NULL, template = NULL, format = NULL, tracing = TRUE)

Arguments

file

The name of a file containing MetaPost code.

cmd

The command to use to run mpost. By default Sys.which is used to find a sensible value.

template

The naming template for the output files that are produced (see mpost's outputtemplate option).

format

The output format (see mpost's outputformat option).

tracing

A logical value indicating whether to generate a log file containing solved paths (see mpost's tracingchoices option).

Details

By default, tracing is TRUE, which produces a log file that can be read into R using mptrace.

Both output and log files will be produced in the same directory as the file.

Value

Used for its side effect of producing output files and log files.

Author(s)

Paul Murrell

See Also

metapost, mptrace

Examples

1
2
3
4
5
6
oldunits <- options(metapost.units="in")
p <- knot(0, 0) + dir(0) + dir(0) + knot(1, 1)
mpfile <- file.path(tempdir(), "fig.mp")
metapost(p, mpfile)
mpost(mpfile)
options(oldunits)

metapost documentation built on June 25, 2019, 1:02 a.m.