Create a standalone png snippet using latex
and dvipng
from an stable
object; both functions are required to be installed for this to work.
The resultant png
file is saved on disk and the relative path to the file
is returned. st2png()
is an alias to st_as_png()
.
st_aspng(
x,
stem = "pmt-standalone-preview",
dir = tempdir(),
font = "helvetica",
textwidth = getOption("pmtables.text.width", 6.5),
border = getOption("pmtables.image.border", "0.2cm 0.7cm"),
ntex = 1,
dpi = 200
)
st2png(
x,
stem = "pmt-standalone-preview",
dir = tempdir(),
font = "helvetica",
textwidth = getOption("pmtables.text.width", 6.5),
border = getOption("pmtables.image.border", "0.2cm 0.7cm"),
ntex = 1,
dpi = 200
)
an stable object; this can be the result of calling stable()
or
stable_long()
.
used to build intermediate and output file names.
directory for building the pdf file.
the font to use; alternative values include roboto
and
utopia
; passed to st_to_standalone()
.
the page width (in inches) when building with pdflatex
;
passed to st_to_standalone()
; see details.
passed as an option to standalone
latex output type; see
details.
number of times to build the pdf file
dots per inch for the resulting png
file; used by dvipng
when
converting dvi
file to the final png
result.
A string containing the path to the rendered png
file.