Description Usage Arguments Details Value Examples
compile_tikz
outputs a standalone LaTeX document with the
specification for a TiKz CONSORT-like plot, and optionally converts the PDF
resulting from running LaTeX on this file to either jpeg or png format.
1 2 | compile_tikz(tikz_code, filename_base, output_dir, output_format = "pdf",
tikzlibs = "", tikzpicture_opts = "", tex_only = FALSE)
|
tikz_code |
String (possibly vector of) containing the main part of the TiKz code you wish to insert into a LaTeX document shell. |
filename_base |
Scalar string giving the root of the filename to which extensions are added to identify the types of files created as a side effect of running the function. |
output_dir |
Scalar string with the name of the directory in which to store files. |
output_format |
String scalar specifying the desired format for the plot graphic created (pdf, jpeg, png). Note that a pdf is always created and is then converted if jpeg or png is requested. (default: pdf) |
tikzlibs |
If additional TiKz libraries are needed, this (possibly vector of) string(s) gives their names (e.g., positining, calc). (default: "") |
tikzpicture_opts |
If options are desired when beginning the TiKz environment, specify them using this vector of strings (e.g., to create styles). (default: "") |
tex_only |
Scalar logical. If true, output the standalone LaTeX document but do not run LaTeX. Useful for debugging problemmatic LaTeX. (default: FALSE) |
The LaTeX standalone document type is a very simple document that creates a page of just the dimensions required to contain the figure. The LaTeX portion of this is therefore fairly simple, except for a macro defined called "coltab" that creates a multirow table. This can be inserted into TiKz nodes as one method to create multirow node labels.
Invisibly returns the LaTeX code generated by the function.
1 | print("Hello world")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.