View source: R/ltx_build_fig.R
ltx_build_fig | R Documentation |
This function wraps a TikZ figure from a provided TeX file in a LaTeX figure environment. It allows for specifying the output file name, title, caption, and label. It also offers the option to copy the figure to the clipboard.
ltx_build_fig(
fig_in = NULL,
fig_out = NULL,
title = NULL,
caption = NULL,
label = NULL,
copy_fig = TRUE
)
fig_in |
A character string specifying the input file path for the TikZ figure. Must not be NULL and must exist in the file system. |
fig_out |
A character string specifying the output file path for the wrapped
LaTeX figure. If NULL, it will save to the same directory as |
title |
A character string for the figure title. Default is "Example figure". |
caption |
A character string for the figure caption. Default is "This figure shows nothing of importance, it is work under construction.". |
label |
A character string for the figure label. Default is "example". |
copy_fig |
A logical indicating whether to copy the figure content to the clipboard. Default is TRUE. |
A character vector representing the complete LaTeX figure environment, invisibly returned.
## Not run:
ltx_build_fig("path/to/tikz_figure.tex", "path/to/wrapped_figure.tex",
title = "Sample Figure", caption = "This is a sample caption.",
label = "sample_fig", copy_fig = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.