powered by
mpost
Run mpost on a MetaPost file, possibly with additional options.
mpost(file = "fig.mp", cmd = NULL, template = NULL, format = NULL, tracing = TRUE)
The name of a file containing MetaPost code.
The command to use to run mpost. By default Sys.which is used to find a sensible value.
Sys.which
The naming template for the output files that are produced (see mpost's outputtemplate option).
outputtemplate
The output format (see mpost's outputformat option).
outputformat
A logical value indicating whether to generate a log file containing solved paths (see mpost's tracingchoices option).
tracingchoices
Used for its side effect of producing output files and log files.
By default, tracing is TRUE, which produces a log file that can be read into R using mptrace.
tracing
TRUE
mptrace
Both output and log files will be produced in the same directory as the file.
file
metapost, mptrace
metapost
# NOT RUN { 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) # }
Run the code above in your browser using DataLab