Learn R Programming

lazyWeave (version 3.0.2)

lazy.build: Compile a PDF or HTML Report

Description

Executes a command to build a pdf file based on a .tex or .html file. For HTML files, compiles the figure into a subfolder and places all of the contents into a zip file

Usage

lazy.build(filename, pdf.zip = NULL, quiet = TRUE, clean = TRUE,
  replace = TRUE, ...)

Arguments

filename

Character string giving the location of the file to be built. Usually a .tex or .html file.

pdf.zip

filename where the completed document should be saved. Usually a .pdf or .zip file.

quiet

Sets the system call flag for a quiet (non-verbose) run.

clean

Sets the system call for cleaning up the folder after completion. If TRUE, extra files generated during processing will be deleted.

replace

when pdf.zip is not NULL, this determines if the new file will overwrite an existing file.

...

Additoinal arguments to be passed to tools::texi2dvi

Details

For TEX files, a call is made using tools::texi2dvi to compile a PDF file.

For HTML files, the referenced figures are gathered, copied into a subdirectory and the HTML document and the figures are placed into a zip folder for convenient transfer. All of the image links in the HTML code are modified to reflect the new location. Lastly, a text file is added with instructions for unzipping the files for convenient viewing (but don't worry, no one ever reads this).