首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在tufte_html中交叉引用图形

在tufte_html中交叉引用图形
EN

Stack Overflow用户
提问于 2018-02-05 09:55:16
回答 1查看 104关注 0票数 1

我正在构建一个tufte::tufte_html,它应该包含对图形的交叉引用。我真不走运,我已经试了一整天了,但都没有结果。

下面,我也尝试了pdf_document2bookdown版本的建议。在这里,任何建议都是宝贵的。

代码语言:javascript
复制
---
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)

代码语言:javascript
复制
# 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)

代码语言:javascript
复制
## 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!
EN

回答 1

Stack Overflow用户

发布于 2019-11-21 18:03:38

您可以使用bookdown包。在这种情况下,您必须在yaml前导码中添加以下“输出”选项:

代码语言:javascript
复制
output:
  bookdown::tufte_html2: default

我想这应该行得通!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48614904

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档