| 
16 | 16 |     size: 12pt  | 
17 | 17 | )  | 
18 | 18 | 
 
  | 
19 |  | -#set heading(numbering: "1.")  | 
20 |  | - | 
21 |  | -#show raw.where(block: true) :set block(fill: rgb("F7F7F7"), inset: 8pt, width: 100%)  | 
22 |  | -#show link :set text(rgb("#996666"))  | 
23 | 19 | 
 
  | 
24 | 20 | // Front matter  | 
25 | 21 | #include "parts/frontmatter.typ"  | 
26 | 22 | 
 
  | 
27 | 23 | // Main matter  | 
 | 24 | +#show raw.where(block: true) :set block(fill: rgb("F7F7F7"), inset: 8pt, width: 100%)  | 
 | 25 | +#show link :set text(rgb("#996666"))  | 
 | 26 | + | 
28 | 27 | #pagebreak(to: "odd")  | 
29 | 28 | #set page(numbering: "1")  | 
30 | 29 | #set heading(numbering: "1.")  | 
31 | 30 | #counter(page).update(1)  | 
32 | 31 | #counter(heading).update(0)  | 
33 | 32 | 
 
  | 
34 |  | -// Intro  | 
35 |  | -#include  "intro/index.typ"  | 
36 |  | -#include  "intro/three-levels.typ"  | 
37 |  | -#include  "intro/what-is-fp.typ"  | 
38 |  | - | 
39 |  | -// The remainder of the main matter is organized into parts  | 
40 |  | -// Offset headings by 1, so that part headings can be level 1 and chapter  | 
41 |  | -// headings are level 2  | 
42 |  | -#set heading(offset: 1)  | 
 | 33 | +// The main matter is organized into parts  | 
43 | 34 | // Start parts on an odd page  | 
44 |  | -#show <part>: it => {  | 
 | 35 | +#show figure.where(kind: "part"): it => {  | 
45 | 36 |     pagebreak(weak: true, to: "odd")  | 
46 |  | -    it  | 
 | 37 | +    set text(size: 24pt * 1.2 * 1.2)  | 
 | 38 | +    align(left)[  | 
 | 39 | +        #strong[#it.supplement #it.counter.display(it.numbering): #it.body]  | 
 | 40 | +    ]  | 
47 | 41 | }  | 
48 | 42 | #show heading.where(level: 1): it => {  | 
49 |  | -    // Part heading starts on an odd page but we insert them based on the label  | 
 | 43 | +    // Chapter heading starts on an odd page. Don't create a page break if the  | 
 | 44 | +    // page is already empty.  | 
 | 45 | +    pagebreak(weak: true, to: "odd")  | 
50 | 46 |     set text(size: 24pt * 1.2 * 1.2)  | 
51 | 47 |     it  | 
52 | 48 |     v(12pt * 1.2 * 1.2)  | 
53 | 49 | }  | 
54 | 50 | #show heading.where(level: 2): it => {  | 
55 |  | -    // Chapter heading starts on an odd page. Don't create a page break if the  | 
56 |  | -    // page is already empty.  | 
57 |  | -    pagebreak(weak: true, to: "odd")  | 
58 |  | -    set text(size: 24pt * 1.2 * 1.2)  | 
 | 51 | +    set text(size: 24pt * 1.2)  | 
59 | 52 |     it  | 
60 | 53 |     v(12pt * 1.2 * 1.2)  | 
61 | 54 | }  | 
 | 
77 | 70 |     it  | 
78 | 71 |     v(12pt)  | 
79 | 72 | }  | 
 | 73 | +// Intro  | 
 | 74 | +#include  "intro/index.typ"  | 
 | 75 | +#include  "intro/three-levels.typ"  | 
 | 76 | +#include  "intro/what-is-fp.typ"  | 
80 | 77 | 
 
  | 
81 | 78 | // Part 1: Foundations  | 
82 | 79 | #include  "parts/part1.typ"  | 
 | 
0 commit comments