由于某种原因,我在Rstudio中从Knit.pdf创建的pdf的TOC没有更新。它正在创建,但有一些过去的信息(在第68页停止,我已经在第99页)。
可能是与缓存信息相关的东西?
在我使用的YAML序言下面,也检查了Knitr Edit R markdown配置下的"包括目录"选项。通过下面的YAML,也尝试在pdf_document下面使用toc:true并且没有工作。
title: "My book"
author: "MyName"
date: "Mydate"
documentclass: book
fontsize: 10pt
classoption:
b5paper
header-includes:
- usepackage{tcolorbox}
- usepackage{longtable}
- usepackage{sidenotes}
- renewcommand{contentsname}{MyContent}
- renewcommand{chaptername}{MyChapter}
geometry:
- tmargin=2cm
- bmargin=2cm
- lmargin=2cm
- rmargin=2cm
toc: yes
output:
pdf_document:
fig_caption: yes
highlight: zenburn
latex_engine: xelatex
number_sections: yes
pandoc_args: --chapters
toc: yes
toc_depth: 3
它是否与toc被调用两次有关,一次只是在输出之前,然后再次在pdf文档下?
yaml::yaml.load(enc2utf8(string),…)错误:复制地图键:'toc'电话:…yaml_load_utf8 -> mark_utf8 -> -> .Call停止执行