ltx_combine | R Documentation |
This function combines multiple latex files. This is done based on the name of the files and should end with raw.tex to make the function pick-up these files.
ltx_combine(combine = ".", out = NULL, presentation = FALSE, clean = 0, ...)
combine |
character string with the location of the raw tex files or list with file names within same directory |
out |
filename for the output latex file (if an empty string is provided it will print to console) |
presentation |
logical indicating if the output is a latex presentation (in this case the results will be placed within frames and without captions and clearpage) |
clean |
integer between 0 and 2 indicating if all individual files should be kept (0), all individual tex and raw tex files should be deleted (1) or all individual files should be deleted (2) |
... |
additional arguments passed through to |
Currently the generated output is saved in the same place where the separate tables and plots are located defined in the 'combine' argument. This is done even when a different file path is specified in 'out' (using the basename function). The reason is to not copy files linked within the document and preventing broken links. This behaviour might change in future releases
The function returns a latex file (or writes output to console)
# Take into account the usage of tempfile() with multiple function calls
## Not run:
data(Theoph)
ltx_list(Theoph[1:11,],out=tempfile(fileext=".tex"),show=FALSE)
ltx_plot(plot(conc~Time,data=Theoph),out=tempfile(fileext=".tex"),show=FALSE)
ltx_combine(combine=tempdir(),out="rep1.tex")
# possibility for presentation layout (beamer template provided in package)
ltx_combine(combine=tempdir(),out="rep1.tex",
template=paste0(system.file(package="R3port"),"/beamer.tex"),
presentation=TRUE)
# Or other template with different orientation
ltx_combine(combine=tempdir(),out="rep1.tex",
template=paste0(system.file(package="R3port"),"/listing.tex"),
orientation="portrait")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.