summaryrefslogtreecommitdiff
path: root/pandoc.sh
blob: 881e00aab126d59fdf3036b1359d90820d4591f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

set -eu

docdate()
{
    git describe --dirty HEAD 2> /dev/null || date -R
}

pandoc \
    --filter ./pandoc-fable-filter \
    --toc \
    --number-sections \
    --standalone \
    --self-contained \
    "-Vdate:$(docdate)" \
    -Vdocumentclass:report \
    -Vtitlepage:true \
    -Vfontsize:12pt \
    "-Vmainfont:Bitstream Charter" \
    -Vsansfont:Cabin \
    "-Vmonofont:Courier 10 Pitch" \
    -Vgeometry:top=2cm,bottom=2.5cm,left=2cm,right=1cm \
    "$@"