Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to specify numbered sections in Pandoc's PDF outline?

I managed to get numbered section and chapter with pandoc using markdown following sources :

---
toc: true
numbersections: true
---

# Big title
## Section
# Another big title
## section
### subection
## pof
## pif

I used the following command to generate pdf document:

$ pandoc outlinetest.md -o outlinetest.pdf

Chapters and sections are numbered correctly :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

But the numbers don’t appear in outlines of evince pdf viewer.
Is it possible to display number in outlines with pandoc ?

>Solution :

You could use the bookmarksnumbered option of the hyperref package:

---
output: pdf_document
toc: true
numbersections: true
---
\hypersetup{bookmarksnumbered}

# Big title
## Section
# Another big title
## section
### subection
## pof
## pif

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading