【发布时间】:2021-09-07 20:28:53
【问题描述】:
我正在用 bookdown 写论文。我想包含一个图形列表,但我不想包含每个图形的全部标题。我的想法是给每个图一个出现在lof 中的标题和第二个没有出现的标题。我尝试使用fig.subcap 来做到这一点,但这并没有给出第二个标题,我想是因为它需要第二个数字存在。
在下面的示例中,我想创建一个带有标题 "My Main Caption. Here is more detail" 的图形,但在 lof 中只有:"My Main Caption"。
---
title: "Queries"
header-includes:
- \usepackage{subfig}
output:
bookdown::pdf_book:
toc: true
lof: yes
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(ggplot2)
```{r irisfig, fig.cap='My Main Caption. Here is more detail'}
ggplot2::ggplot(iris, aes(Sepal.Length, Sepal.Width))+
geom_point()
这不起作用:
```{r irisfig2, fig.cap='My Main Caption.', fig.subcap= c('Here is more detail')}
ggplot2::ggplot(iris, aes(Sepal.Length, Sepal.Width))+
geom_point()
【问题讨论】:
标签: r latex r-markdown caption subfigure