From 3ad225571706f58b18a6799fa22511e787109253 Mon Sep 17 00:00:00 2001
From: Andrew Dunning <adunning@users.noreply.github.com>
Date: Wed, 23 Jan 2019 00:11:13 -0500
Subject: LaTeX template: Respect `numbersections` for books (#5235)

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

Notes on secnumdepth:

1 = Number `\section`
0 = Number `\chapter`
-1 = Number `\part`
-2 = No numbering
---
 data/templates/default.latex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'data/templates/default.latex')

diff --git a/data/templates/default.latex b/data/templates/default.latex
index 01e435b43..f76f25ca5 100644
--- a/data/templates/default.latex
+++ b/data/templates/default.latex
@@ -277,7 +277,7 @@ $endif$
 $if(numbersections)$
 \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$}
 $else$
-\setcounter{secnumdepth}{0}
+\setcounter{secnumdepth}{-2}
 $endif$
 $if(beamer)$
 $else$
-- 
cgit v1.2.3

