【问题标题】:Missing numbers in bookdown pdf outputbookdown pdf输出中缺少数字
【发布时间】:2018-07-13 20:22:28
【问题描述】:

这是我在这里的第一篇文章,也是我的第一个 bookdown 项目。

我不知道应该往哪里看。 问题:在我的 pdf 输出中,第一级是 not 编号的,所有 页码是 罗马 数字。目录如下所示:

对应的_output.yaml包含:

   bookdown::pdf_book:
      includes:
    in_header: preamble.tex
    before_body: before_body.tex
    after_body: after_body.tex 
  latex_engine: xelatex
  number_sections: yes
  fig_caption: yes
  citation_package: natbib
  toc_depth: 4
  toc_unnumbered: no 
  keep_tex: yes 

HTML 输出正常且编号正确。我使用最新版本的 一切都在win 10下。因为这是我的第一个项目, 大多数其他文件来自 bookdown 样本书。我应该去哪里看 我该如何解决这个问题?

【问题讨论】:

  • 你应该检查你的 preamble.tex...
  • 不知道tex,哪个设置控制索引编号和页码?
  • 我使用了来自github.com/rstudio/bookdown/blob/master/inst/examples/latex/… 的那个,并且不得不删除“\setmainfont[UprightFeatures={SmallCapsFont=AlegreyaSC-Regular}]{Alegreya}”这一行,因为我的系统上没有安装该字体。

标签: latex r-markdown bookdown


【解决方案1】:

感谢 preamble.tex 的提示,我删除了该行

\frontmatter

现在我在 pdf 文件中有一个不错的格式。我仍然需要理解它为什么起作用:-(

【讨论】:

    猜你喜欢
    • 2021-05-25
    • 1970-01-01
    • 2023-03-09
    • 2017-02-14
    • 1970-01-01
    • 2019-07-09
    • 1970-01-01
    • 2020-05-30
    • 2020-02-12
    相关资源
    最近更新 更多