Skip to content

Commit cd41f16

Browse files
committed
Generate PDF
1 parent 8c11679 commit cd41f16

3 files changed

Lines changed: 61 additions & 10 deletions

File tree

Makefile

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
11

2-
3-
4-
5-
build:
6-
quarto render docs/
7-
open docs/_build/index.html
8-
92
preview:
103
quarto preview docs/
114

125
render:
136
quarto render docs/
147

8+
pdf:
9+
quarto render docs/ --to pdf
10+
11+
docx:
12+
quarto render docs/ --to docx
13+
1514
open:
1615
open docs/_build/index.html
1716

1817
open-pdf:
1918
open docs/_build/Predictive-Modeling-in-Python.pdf
2019

20+
clean:
21+
rm -rf docs/_build
22+
rm -rf docs/.quarto
2123

24+
build:
25+
$(MAKE) render
26+
$(MAKE) open
2227

2328
render-fresh:
24-
rm -rf docs/_build
25-
rm -rf docs/.quarto
26-
quarto render docs/
29+
$(MAKE) clean
30+
$(MAKE) render
31+
32+
render-fresh-pdf:
33+
$(MAKE) clean
34+
$(MAKE) pdf
35+
36+
render-fresh-docx:
37+
$(MAKE) clean
38+
$(MAKE) docx

docs/_pdf_styles.tex

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
% _pdf_styles.tex
2+
3+
\usepackage{fontspec}
4+
5+
% define \headingfont to use Source Sans Bold
6+
\newfontfamily\headingfont
7+
[ UprightFont = *-Regular,
8+
BoldFont = *-Bold ]
9+
{Source Sans 3}
10+
11+
\usepackage{titlesec}
12+
13+
% Chapter titles in SS3 Bold
14+
\titleformat{\chapter}[display]
15+
{\headingfont\bfseries\huge}
16+
{\chaptername\ \thechapter}{20pt}{\Huge}
17+
18+
% Section titles in SS3 Bold
19+
\titleformat{\section}
20+
{\headingfont\bfseries\Large}
21+
{\thesection}{1em}{}

docs/_quarto.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,21 @@ format:
245245
# toc: true # include a table of contents
246246
# toc-depth: 2 # control depth of table of contents
247247
# embed-fonts: true # embed fonts in the DOCX
248+
249+
250+
pdf:
251+
252+
# use XeLaTeX or LuaLaTeX so fontspec works:
253+
latex-engine: xelatex
254+
255+
mainfont: "Source Sans 3" # "Merriweather"
256+
sansfont: "Source Sans 3" # "Helvetica Neue"
257+
monofont: "Menlo"
258+
#fontsize: 11pt
259+
#linestretch: 1.2
260+
261+
includes:
262+
in-header: _pdf_styles.tex
263+
264+
#PrettyPDF-pdf:
265+
# keep-tex: true

0 commit comments

Comments
 (0)