英文:
List of Tables and List of Figures in Table of Contents using Quarto book in pdf format
问题
我想获取目录中的表格列表(lot
)和图表列表(lof
)以及书籍的[标签: quarto] [标签: pdf]格式。我在我的 _quarto.yml
文件中有以下 YAML
代码。我对实现这一目标的方法很感兴趣。
project:
type: book
execute:
echo: false
warning: false
book:
title: "Title"
author: "Author"
chapters:
- index.qmd
- Ch01.qmd
- Ch02.qmd
- references.qmd
bibliography: references.bib
format:
pdf:
documentclass: scrreprt
toc: true
toc-depth: 3
lof: true
lot: true
英文:
I would like to get List of Tables (lot
) and List of Figures (lof
) in Table of Contents (toc
) a book in the [tag:quarto] [tag:pdf] format. I have the following YAML
code in my _quarto.yml
file. I'm curious about the approach to achieve this.
project:
type: book
execute:
echo: false
warning: false
book:
title: "Title"
author: "Author"
chapters:
- index.qmd
- Ch01.qmd
- Ch02.qmd
- references.qmd
bibliography: references.bib
format:
pdf:
documentclass: scrreprt
toc: true
toc-depth: 3
lof: true
lot: true
答案1
得分: 1
使用 LaTeX 包tocbibind
。根据该包的文档,
> tocbibind 包使得目录、图表目录、表格目录、参考文献和索引的标题都可以添加到目录中。默认情况下,如果存在这些文档元素,它们都会被并入目录。
因此,它还会包括Table of Contents
的标题,这可能不是你想要的。要禁止包含Table of Contents
,请使用 nottoc
作为 classoption。
project:
type: book
execute:
echo: false
warning: false
book:
title: "Title"
author: "Author"
chapters:
- index.qmd
- Ch01.qmd
- Ch02.qmd
- references.qmd
bibliography: references.bib
format:
pdf:
documentclass: scrreprt
classoption: nottoc
toc: true
toc-depth: 3
lof: true
lot: true
include-in-header:
text: |
\usepackage{tocbibind}
现在目录的样子如下:
英文:
Use the latex package tocbibind
. From the package documentation,
> The tocbibind package enables the titles of the Table of Contents, the List of
Figures, the List of Tables, the Bibliography and the Index all to be added to the
Table of Contents. By default, all of these document elements, if they exist, will
be incorporated into the Table of Contents.
So it will include the title Table of Contents
too, which probably you do not want. To disable the inclusion of Table of Contents
, use nottoc
as classoption.
project:
type: book
execute:
echo: false
warning: false
book:
title: "Title"
author: "Author"
chapters:
- index.qmd
- Ch01.qmd
- Ch02.qmd
- references.qmd
bibliography: references.bib
format:
pdf:
documentclass: scrreprt
classoption: nottoc
toc: true
toc-depth: 3
lof: true
lot: true
include-in-header:
text: |
\usepackage{tocbibind}
And the ToC looks like this now,
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论