View source: R/writeTableToPDF.R
writeTableToPDF | R Documentation |
Function to create a pdf file from latex from a tabular object.
writeTableToPDF(
tbl_tex,
template_tex = NULL,
pdf_name = "table.pdf",
insertion_point = "&&tex_str",
pageheight = 8.5,
pagewidth = 6.5,
margin = 0.1,
orientation = "portrait",
units = "in",
cleanup = TRUE
)
tbl_tex |
|
template_tex |
|
pdf_name |
|
insertion_point |
|
pageheight |
|
pagewidth |
|
margin |
|
orientation |
|
units |
|
cleanup |
|
This function inserts the latex string tbl_tex
returned by tables::toLatex()
called on
a table tbl
into a tex template (tex_template
) for a document. It then converts the resulting tex to a pdf using
writeTexToPDF()
.
The insertion point in the template is indicated by the value of insertion_point
. A default template is provided in
tex/templateForTable.tex
.
The intermediate files are named "tex_DUMMY_TEX_FILE" with extensions .tex, .aux, .log, and .pdf. The pdf file is copied to the file given by pdf_name (which defaults to 'table.pdf').
Invisibly, the tex string for the pdf document.
The use of orientation="landscape" reverses the sense of pageheight and pagewidth in determining the page size, but does not rotate the table.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.