fig_cap: Caption generator

Description Usage Arguments Note

View source: R/caption-functions.r

Description

Use this with chunk option fig.cap to attach a copy of the produced graphic in the resulting pdf.

Usage

1
fig_cap(cap, attach = NULL, ext = NULL, warn = TRUE)

Arguments

cap

Caption

attach

attach graph? if NULL then this parameter will be taken from opts_proh$get('attach_graph')

ext

what is the file extension? if NULL then this parameter will be taken from opts_proh$get('graph_dev')

warn

warn if extension does not seem available?

Note

Beware if you want different extension in the attachment than appears in your pdf. LaTeX has a default order in which it chooses formats if a file name is not unique (knitr does not specify extension). E.g. you might want pdf:s in your pdf but .png in you attachment. Then you can specify something like \DeclareGraphicsExtensions{.pdf,.eps,.png,.jpg,jpeg} in the preamble of you LaTeX document.


renlund/attacher documentation built on Jan. 25, 2022, 6:33 p.m.