mat_tex_to_png | R Documentation |
Convert tex to png
This is a wrapper for mat_table_to_pdf and mat_pdf_to_png
mat_tex_to_png(
path,
path_out = gsub("\\.tex$", ".png", path),
correct_grayscale = TRUE,
step1_args = list(),
step2_args = list()
)
path |
Path for the .tex on disk |
path_out |
Where to save .png |
correct_grayscale |
Arguments passed to |
step1_args , step2_args |
Lists of arguments passed to |
mat_table_to_pdf
, mat_pdf_to_png
## Not run:
tab <- data.frame(variable= c("A", "B"), stat = c("mean"), value = 1:2)
tab_xt <- print(xtable::xtable(tab), print.results = FALSE)
##
tmp_file <- tempfile()
print(xtable::xtable(tab), file = tmp_file)
mat_tex_to_png(tmp_file, "table_as_image.png")
## Pass other argumetns to mat_table_to_pdf or mat_pdf_to_png
mat_tex_to_png(tmp_file, "table_as_image.png", step1_args = list(quiet=FALSE))
mat_tex_to_png(tmp_file, "table_as_image.png", step2_args = list(echo=FALSE))
## remove file
file.remove("table_as_image")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.