mirror of
https://github.com/Wandmalfarbe/pandoc-latex-template.git
synced 2025-02-21 01:51:18 +00:00
Merge pull request #74 from umanovskis/master
Add support for first-chapter variable
This commit is contained in:
commit
7630b2c88c
@ -108,6 +108,10 @@ This template defines some new variables to control the appearance of the title
|
||||
|
||||
the width of the logo (in points)
|
||||
|
||||
- `first-chapter` (defaults to `1`)
|
||||
|
||||
if typesetting a book with chapter numbers, specifies the number that will be assigned to the first chapter
|
||||
|
||||
## Examples
|
||||
|
||||
### Numbered Sections
|
||||
@ -171,7 +175,7 @@ pandoc example.md -o example.pdf --template eisvogel -V lang=de
|
||||
|
||||
To typeset a book supply the template variable `-V book`.
|
||||
|
||||
To get the correct chapter headings you need to tell pandoc that it should convert first level headings (indicated by one `#` in markdown) to chapters with the command line option `--top-level-division=chapter`.
|
||||
To get the correct chapter headings you need to tell pandoc that it should convert first level headings (indicated by one `#` in markdown) to chapters with the command line option `--top-level-division=chapter`. Chapter numbers start at 1. If you need to change that, specify `first-chapter` in the template variables.
|
||||
|
||||
There will be one blank page before each chapter because the template is two-sided per default. So if you plan to publish your book as a PDF and don't need a blank page you should add the class option `onesided` which can be done by supplying a template variable `-V classoption=oneside`.
|
||||
|
||||
|
@ -736,6 +736,11 @@ $abstract$
|
||||
$endif$
|
||||
$endif$
|
||||
|
||||
$if(first-chapter)$
|
||||
\setcounter{chapter}{$first-chapter$}
|
||||
\addtocounter{chapter}{-1}
|
||||
$endif$
|
||||
|
||||
$for(include-before)$
|
||||
$include-before$
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user