Closed TomAugspurger closed 8 years ago
See http://r4ds.had.co.nz/graphics-for-communication.html#saving-your-plots -> 28.7.1 Figure sizing
The biggest challenge of graphics in RMarkdown is getting your figures the right size and shape. There are five main options that control figure sizing: fig.width, fig.height, fig.asp, out.width and out.height. Image sizing is challenging because there are two sizes (the size of the figure created by R and the size at which it is inserted in the output document), and multiple ways of specifying the size (i.e., height, width, and aspect ratio: pick two of three).
If stitch should support something similar IMO it should keep fig....
and out....
prefix. IMO it also makes sense as there are more fig
options, e.g. fig.caption
.
👍 I'll get to that next week probably. Pandoc accepts width, height, and dpi. We should be able to handle fig.asp
as long as we have one of height or width.
We'll take the value of fig.cap
and just shift it into the Para we wrap the image in.
Will probably change the API to also accept
fig.width
orfig_width
for compat with RMarkdown. That can be done as a preprocessing of the file or later since it's an option for the rendering, not the execution.