From 61f64fcaacf7ab2fced0214c1eccbbdb00e313cd Mon Sep 17 00:00:00 2001 From: Philipp Dargel Date: Sun, 9 Sep 2018 16:42:40 +0200 Subject: [PATCH 1/4] add book option --- eisvogel.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eisvogel.tex b/eisvogel.tex index eb0549d..f8f6fdc 100644 --- a/eisvogel.tex +++ b/eisvogel.tex @@ -44,7 +44,7 @@ $if(dir)$$if(latex-dir-rtl)$ \PassOptionsToPackage{RTLdocument}{bidi} $endif$$endif$% -\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$else$a4paper,$endif$$if(beamer)$ignorenonframetext,$if(handout)$handout,$endif$$if(aspectratio)$aspectratio=$aspectratio$,$endif$$endif$$for(classoption)$$classoption$$sep$,$endfor$,tablecaptionabove]{scrartcl} +\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$else$a4paper,$endif$$if(beamer)$ignorenonframetext,$if(handout)$handout,$endif$$if(aspectratio)$aspectratio=$aspectratio$,$endif$$endif$$for(classoption)$$classoption$$sep$,$endfor$,tablecaptionabove]{$if(book)$scrbook$else$scrartcl$endif$} $if(beamer)$ $if(background-image)$ \usebackgroundtemplate{% From fc90772d7225e4b0f2447cfa07fdff7135400883 Mon Sep 17 00:00:00 2001 From: Philipp Dargel Date: Sun, 9 Sep 2018 16:55:12 +0200 Subject: [PATCH 2/4] use book varibale in example build --- examples/build.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/build.sh b/examples/build.sh index a1bb977..4501f03 100644 --- a/examples/build.sh +++ b/examples/build.sh @@ -31,11 +31,8 @@ pdftoppm -r 150 -png "without-listings/without-listings.pdf" > "without-listings pandoc "green-titlepage/green-titlepage.md" -o "green-titlepage/green-titlepage.pdf" --from markdown --template "../eisvogel.latex" --listings pdftoppm -r 150 -png "green-titlepage/green-titlepage.pdf" > "green-titlepage/green-titlepage.png" -# replace the document class `scrartcl` with `scrbook -sed 's/scrartcl/scrbook/g' <"../eisvogel.latex" >"../eisvogel-book.latex" - -pandoc "book/book.md" -o "book/book.pdf" --from markdown --template "../eisvogel-book.latex" --listings -V classoption=oneside --top-level-division=chapter +pandoc "book/book.md" -o "book/book.pdf" --from markdown --template "../eisvogel.latex" --listings -V book -V classoption=oneside --top-level-division=chapter pdftoppm -r 150 -png "book/book.pdf" > "book/book.png" pandoc "images-and-tables/images-and-tables.md" -o "images-and-tables/images-and-tables.pdf" --from markdown --template "../eisvogel.latex" --listings --resource-path "./images-and-tables/" -pdftoppm -r 150 -png "images-and-tables/images-and-tables.pdf" > "images-and-tables/images-and-tables.png" \ No newline at end of file +pdftoppm -r 150 -png "images-and-tables/images-and-tables.pdf" > "images-and-tables/images-and-tables.png" From 20037b85f802f241296f77da95196c23d41531da Mon Sep 17 00:00:00 2001 From: Philipp Dargel Date: Sun, 9 Sep 2018 17:12:45 +0200 Subject: [PATCH 3/4] changed README to refer to variable --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0bc1450..0c2bd07 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ pandoc example.md -o example.pdf --template eisvogel -V lang=de ### Typesetting a Book -The template uses the default KOMA-Script class `scrartcl` as the document class because it has some advantages over the default `article` class. For typesetting a book I recommend the corresponding KOMA-Script class `scrbook` instead of the default `book`. You can manually replace the string `scrartcl` in the template with `scrbook`. +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`. From ab44ed727b88ac575d6f93dfd914d0f759953480 Mon Sep 17 00:00:00 2001 From: Philipp Dargel Date: Sun, 9 Sep 2018 18:09:40 +0200 Subject: [PATCH 4/4] add new variable to list of variables in readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0c2bd07..0ef1f90 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,9 @@ This template defines some new variables to control the appearance of the title - `footer-right` (defaults to the page number) the text on the right side of the footer +- `book` (defaults to `false`) + + typeset as book. ## Examples