mpost {metapost} | R Documentation |
Run mpost
on a MetaPost File
Description
Run mpost
on a MetaPost file, possibly with additional options.
Usage
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 |
template |
The naming template for the output files that are produced
(see |
format |
The output format
(see |
tracing |
A logical value indicating whether to generate a log
file containing solved paths
(see |
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
Examples
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)
[Package metapost version 1.0-6 Index]