Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeX template: Respect numbersections for books #5235

Merged
merged 2 commits into from
Jan 23, 2019
Merged

LaTeX template: Respect numbersections for books #5235

merged 2 commits into from
Jan 23, 2019

Conversation

adunning
Copy link
Contributor

@adunning adunning commented Jan 20, 2019

Ensure that \part and \chapter are only numbered if numbersections is set. To return to the previous behaviour, use -V numbersections -V secnumdepth=0.

With the Pandoc 2.5 template, one has to set numbersections to remove part/chapter numbering:

pandoc -o chnum.pdf << EOT

---
documentclass: book
numbersections: true
secnumdepth: -2
---

# Test

# Test

EOT

adunning and others added 2 commits January 19, 2019 21:01
Ensure that `\part` and `\chapter` are only numbered if `numbersections` is set. To return to the previous behaviour, use `-V numbersections -V secnumdepth=0`.
@jgm
Copy link
Owner

jgm commented Jan 22, 2019

Can you explain how this works? I don't understand what setting this to -2 does...

@adunning
Copy link
Contributor Author

Setting secnumdepth is a bit counterintuitive:

1 = Number \section
0 = Number \chapter
-1 = Number \part
-2 = No numbering

@jgm
Copy link
Owner

jgm commented Jan 23, 2019

Setting secnumdepth is a bit counterintuitive:

like so much in LaTeX...

@jgm jgm merged commit 3ad2255 into jgm:master Jan 23, 2019
@adunning adunning deleted the patch-3 branch January 23, 2019 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants