This PR implements functionality to render a stable object in image format to be saved on disk and / or to be included inline in an html Rmarkdown document.
st_aspdf() - write table to a standalone tex template and render with pdflatex
st_aspng() - write table to a standalone tex template, render with latex and convert with dvipng
st_as_image() - a one liner that renders the table as pdf and then reads it back in using magick:::read_image_pdf()
st_show_image() - exposed worker that displays image object based on current context
If knitting, then the image width is resized to a percentage of the available space
If not knitting, then the image width is resized to a percentage of the graphics device
In case the image fails to render, you will still get back an image, but the image will include text notifying you that the build failed
When building via png the resolution can be passed through
Summary
This PR implements functionality to render a
stable
object in image format to be saved on disk and / or to be included inline in anhtml
Rmarkdown document.st_aspdf()
- write table to a standalone tex template and render withpdflatex
st_aspng()
- write table to a standalone tex template, render withlatex
and convert withdvipng
st_as_image()
- a one liner that renders the table as pdf and then reads it back in usingmagick:::read_image_pdf()
st_show_image()
- exposed worker that displays image object based on current contextpng
the resolution can be passed throughAdded to suggests
magick
pdftools
System dependencies
pdflatex
latex
dvipng