Bookdown:章节交叉引用不起作用(gitbook)

问题描述 投票:1回答:1

我在我的一个书本项目中遇到了麻烦,其中章节/节的交叉引用在html输出中不再起作用。

问题是html链接有效,但它们显示为??-缺少节号。这只是本书的html版本中的问题。 pdf版本可正确编译。

在寻找解决方案时,我尝试使用默认的演示安装来创建new bookdown项目,并且该错误与该图中突出显示的错误相同:

如上所述,此错误发生在默认安装的书本中...01-intro.Rmd的摘录(即在Rstudio中:文件>>新项目>>新目录>>使用bookdown的Book项目)。

# Introduction {#intro} You can label chapter and section titles using `{#label}` after them, e.g., we can reference Chapter \@ref(intro). If you do not manually label them, there will be automatic labels anyway, e.g., Chapter \@ref(methods). Figures and tables with captions will be placed in `figure` and `table` environments, respectively.

这里是我的sessionInfo()

> sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 17134) Matrix products: default locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.6.1 bookdown_0.16 htmltools_0.4.0 tools_3.6.1 [5] yaml_2.2.0 Rcpp_1.0.3 rmarkdown_2.0 knitr_1.26 [9] xfun_0.11 digest_0.6.23 rlang_0.4.2 evaluate_0.14

我在我的一个书本项目中遇到了麻烦,其中章节/节的交叉引用在html输出中不再起作用。问题是html链接可以正常工作,但它们会显示出来...
r bookdown
1个回答
1
投票
找到了解决方法
© www.soinside.com 2019 - 2024. All rights reserved.