我正在构建一个tufte::tufte_html,它应该包含对图形的交叉引用。我真不走运,我已经试了一整天了,但都没有结果。
下面,我也尝试了pdf_document2的bookdown版本的建议。在这里,任何建议都是宝贵的。
---
title: "Repro cross-referencing"
subtitle: "A how to guide"
author: "Deependra Dhakal"
date: "`r Sys.Date()`"
output:
tufte::tufte_html: default
link-citations: yes
---
```{r setup, include=FALSE}库(Tufte)
在tufte版本更改时使缓存无效
Knitr::opts_chunk$set(整齐= FALSE,cache.extra = packageVersion('tufte'))
选项(htmltools.dir.version= FALSE)
# Introduction
This is just an example
```{r examp-fig, fig.width=10, fig.cap="\\label{fig:examp-fig}Not a good caption"}绘图(2:5,5:8)
## Try referencing here
Through the figure [@fig:examp-fig], I am trying to demonstrate how cross referencing works. But apparently this doesn't work.
Is this any better? The figure \@ref(fig:examp-fig) is being referenced here. Naaah!发布于 2019-11-21 18:03:38
您可以使用bookdown包。在这种情况下,您必须在yaml前导码中添加以下“输出”选项:
output:
bookdown::tufte_html2: default我想这应该行得通!
https://stackoverflow.com/questions/48614904
复制相似问题