Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.21k stars 968 forks source link

First-chapter option seems to be reduced by one #116

Open cavo789 opened 5 years ago

cavo789 commented 5 years ago

Good morning

By having the book: true parameter in my YAML block, my headings are starting at 0 (the documentation mention that defaults is 1).

So, I've put first-chapter: 5 for test purposes and I can see that numbering is starting at 4. (#74)

Is this how the first-chapter option is intended to work? Should we specify the desired number + 1? (2 for getting things started at 1)

Thanks!

First-chapter has been reduced by one

My markdown

---
book: true
first-chapter: 5
---
# Eisvogel

A clean **pandoc LaTeX template** to convert your markdown files to PDF or LaTeX. It is designed for lecture notes and exercises with a focus on computer science. The template is compatible with pandoc 2.

## Preview

## Installation

## Usage

## Examples

### Numbered Sections

### Syntax Highlighting with Listings

### Syntax Highlighting Without Listings

### Standalone LaTeX Document

### Changing the Document Language

### Typesetting a Book

### Example Images

## Credits

## License
pwaring commented 4 years ago

In case it helps, I've also run into this problem, using the latest template from master. first-chapter: 2 results in the first chapter being 1, and not specifying it results in chapters starting from 0.

pwaring commented 4 years ago

Also, if you use --top-level-division=chapter, then first-chapter: 1 will start the chapters from 1. I think this is the right flag to use when generating books as otherwise Pandoc treats chapter headings as section headings, so you end up with "1.1 Introduction" instead of "1 Introduction".