How to prevent the text in the list of figures to be too long
zavud opened this issue · comments
I add a title and text explaining the figure when I add a figure to a pdf output.
For example, when I do:
```{r, fig.cap="I want this sentence to appear in list of figures section of the output pdf. But I do not want any sentences after the first one to appear there. But I still want all sentences to appear under the figure in the output."}
knitr::include_graphics("somefigure.pdf")
The whole sentence will go to the list of figures section. This is a dummy example and I have much longer texts that I have to write in the fig.cap=""
. Is there a way to fix this? :)
Yup -- just use the chunk option fig.scap
for the alternative caption that you want shown in the list of figures.
This is documented here: https://ulyngs.github.io/oxforddown/customisations-and-extensions.html?q=caption#shorten-captions-shown-in-the-list-of-figures-pdf