-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpdf-options.yml
79 lines (70 loc) · 2.58 KB
/
pdf-options.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# options for pdf latex processor
variables:
# Page options
pagestyle: headings
geometry:
- top=1in
- left=0.9in
- right=0.9in
- bottom=1in
- heightrounded
header-includes: |
% Customize header & footer
% Sources:
% https://tex.stackexchange.com/questions/139139/adding-headers-and-footers-using-pandoc
% https://texblog.org/2012/10/09/changing-the-font-size-in-fancyhdr/
\usepackage{fancyhdr}
\pagestyle{fancy}
\newcommand{\changefont}{%
\fontsize{9}{11}\selectfont
}
\fancyhf{}
\fancyhead[LE,RO]{\changefont \slshape \rightmark} %section
\fancyhead[RE,LO]{\changefont \slshape \leftmark} %chapter
\fancyfoot[CO,CE]{\changefont Published by Semaphore: CI/CD for teams that don’t like bottlenecks - semaphoreci.com}
\fancyfoot[LE,RO]{\changefont \thepage}
% Don't let figures float
% Source: https://stackoverflow.com/questions/49482221/pandoc-markdown-to-pdf-image-position
\usepackage{float}
\let\origfigure\figure
\let\endorigfigure\endfigure
\renewenvironment{figure}[1][2] {
\expandafter\origfigure\expandafter[H]
} {
\endorigfigure
}
% Handle documents without code fenced
% the next hack in this file breaks the build if there aren't any code fences in the document
% this creates an empty environment so the build always works
% Source: https://tex.stackexchange.com/questions/41496/how-to-define-an-environment-only-if-it-is-not-defined-yet-using-etoolbox
\ifcsmacro{Shaded}{}{
\let\endmyenvironment\undefined%
\newenvironment{Shaded}{End.}
}
% Hack to decrease font size in code blocks
% Options for font size:
% huge, LARGE, Large, large, normalsize, small, footnotesize, scriptsize, tiny
% Source: https://stackoverflow.com/questions/27000906/how-to-set-the-font-size-for-code-blocks-in-pandoc-markdown#comment78049604_27159300
\renewenvironment{Shaded} {\footnotesize} {}
# Link handling
colorlinks: true
# links-as-notes: true
# Font settings
# source: https://tex.stackexchange.com/questions/234786/how-to-set-a-font-family-with-pandoc
fontsize: 12pt
mainfont: OpenSans
mainfontoptions:
- Path=fonts/OpenSans/
- Extension=.ttf
- UprightFont=*-Regular
- BoldFont=*-Bold
- ItalicFont=*-Italic
- BoldItalicFont=*-BoldItalic
monofont: SourceCodePro
monofontoptions:
- Path=fonts/SourceCodePro/
- Extension=.ttf
- UprightFont=*-Regular
- BoldFont=*-Bold
- ItalicFont=*-Italic
- BoldItalicFont=*-BoldItalic