【发布时间】:2018-11-23 01:00:00
【问题描述】:
使用带有 PDF 输出的 R markdown,我想将一个图形引用到另一个图形标题中。我还想在标题中引用 BibTex 参考。有任何想法吗?下面是代码示例:
---
title: "Untitled"
author: "me"
date: "today"
output:
pdf_document:
latex_engine: lualatex
number_sections: no
linestretch: 1.5
bibliography: input/Library.bib
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
```
```{r}
df <- mtcars
library(ggplot2)
```
```{r, fig.cap="some stuff"}
ggplot(df, aes(cyl, mpg)) + geom_point()
```
```{r, fig.cap="some more stuff. here I'd like to cite figure 1. I would also like a BibTex citation"}
ggplot(df, aes(cyl, hp)) + geom_point()
```
【问题讨论】:
标签: r latex r-markdown pandoc