How do I include "References" and "Citation" section in the TOC? #6021
-
DescriptionFor HTML output formats, the automatically generated "References" and "Citation" sections are not included in the table of contents. Is there a way to include those sections in the TOC? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This is because References and citations have a special treatment in our Default template to be included into the appendix section at the bottom. See https://quarto.org/docs/authoring/appendices.html You could opt out this for it to behave like regular document with References place by default at the bottom of the document. You could then add a section above and it would be in the TOC ---
title: "My Document"
format: html
toc: true
appendix-style: none
bibliography: references.bib
---
# Title
```{r}
knitr::write_bib("knitr", "references.bib")
```
# References
See @R-knitr You can also control the placement of the bibliography. This will prevent the References part to be included in the appendix ---
title: "My Document"
format: html
toc: true
bibliography: references.bib
---
# References
::: {#refs}
:::
# Title
```{r}
#| include: false
knitr::write_bib("knitr", "references.bib")
```
See @R-knitr
Hope it helps |
Beta Was this translation helpful? Give feedback.
-
Thanks so much! Two more questions if you don't mind:
![]()
Thanks again. |
Beta Was this translation helpful? Give feedback.
This is because References and citations have a special treatment in our Default template to be included into the appendix section at the bottom. See https://quarto.org/docs/authoring/appendices.html
You could opt out this for it to behave like regular document with References place by default at the bottom of the document. You could then add a section above and it would be in the TOC
You can also control the placement of the bibliography. This will prevent the References part to be included in t…