feat: improve dvd.typ formatting
Some checks are pending
Deploy Quartz site to GitHub Pages using Nix / build (push) Waiting to run
Deploy Quartz site to GitHub Pages using Nix / deploy (push) Blocked by required conditions

This commit is contained in:
Youwen Wu 2025-01-08 01:20:12 -08:00
parent b84073f524
commit 711b20c81d
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
6 changed files with 116 additions and 55 deletions

View file

@ -66,14 +66,16 @@
set heading(numbering: "1.")
show heading: it => {
set text(font: "Libertinus Serif")
set par(first-line-indent: 0em)
if it.numbering != none {
text(rgb("#2196F3"), weight: 500)[#sym.section]
block[
#if it.numbering != none {
text(rgb("#2196F3"), weight: 500)[#sym.section]
text(rgb("#2196F3"))[#counter(heading).display() ]
}
it.body
text(rgb("#2196F3"))[#counter(heading).display() ]
}
#it.body
#v(0.5em)
]
}
set text(font: "New Computer Modern", lang: "en")
@ -126,7 +128,8 @@
// Main body.
set par(
justify: true,
first-line-indent: 1em,
spacing: 0.65em,
first-line-indent: 2em,
)
body
@ -170,7 +173,7 @@
namefmt: x => [(#x)],
titlefmt: strong,
bodyfmt: x => x,
separator: [#h(0.1em).#h(0.2em) \ ],
separator: [. \ ],
base: "heading",
base_level: none,
) = {
@ -190,7 +193,7 @@
title += " " + number
}
title = titlefmt(title)
body = bodyfmt(body)
body = [#pad(top: 2pt, bodyfmt(body))]
pad(
..padding,
showybox(
@ -200,7 +203,9 @@
padding: (top: 0em, bottom: 0em),
..blockargs.named(),
..blockargs_individual.named(),
[#title#name#titlefmt(separator)#body],
[
#title#name#titlefmt(separator)#body
],
),
)
}
@ -286,6 +291,7 @@
#let example = example-style("item", "Example")
#let proof(body, name: none) = {
v(0.5em)
[_Proof_]
if name != none {
[ #thmname[#name]]
@ -303,6 +309,7 @@
sym.space.nobreak
$square.stroked$
v(0.5em)
}
#let fact = thmplain(
@ -310,8 +317,8 @@
"Fact",
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)
#let abuse = thmplain(
"item",
@ -319,6 +326,7 @@
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)
#let definition = thmplain(
"item",
@ -326,4 +334,5 @@
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)

View file

@ -66,14 +66,16 @@
set heading(numbering: "1.")
show heading: it => {
set text(font: "Libertinus Serif")
set par(first-line-indent: 0em)
if it.numbering != none {
text(rgb("#2196F3"), weight: 500)[#sym.section]
block[
#if it.numbering != none {
text(rgb("#2196F3"), weight: 500)[#sym.section]
text(rgb("#2196F3"))[#counter(heading).display() ]
}
it.body
text(rgb("#2196F3"))[#counter(heading).display() ]
}
#it.body
#v(0.5em)
]
}
set text(font: "New Computer Modern", lang: "en")
@ -126,7 +128,8 @@
// Main body.
set par(
justify: true,
first-line-indent: 1em,
spacing: 0.65em,
first-line-indent: 2em,
)
body
@ -170,7 +173,7 @@
namefmt: x => [(#x)],
titlefmt: strong,
bodyfmt: x => x,
separator: [#h(0.1em).#h(0.2em) \ ],
separator: [. \ ],
base: "heading",
base_level: none,
) = {
@ -190,7 +193,7 @@
title += " " + number
}
title = titlefmt(title)
body = bodyfmt(body)
body = [#pad(top: 2pt, bodyfmt(body))]
pad(
..padding,
showybox(
@ -200,7 +203,9 @@
padding: (top: 0em, bottom: 0em),
..blockargs.named(),
..blockargs_individual.named(),
[#title#name#titlefmt(separator)#body],
[
#title#name#titlefmt(separator)#body
],
),
)
}
@ -286,6 +291,7 @@
#let example = example-style("item", "Example")
#let proof(body, name: none) = {
v(0.5em)
[_Proof_]
if name != none {
[ #thmname[#name]]
@ -303,6 +309,7 @@
sym.space.nobreak
$square.stroked$
v(0.5em)
}
#let fact = thmplain(
@ -310,8 +317,8 @@
"Fact",
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)
#let abuse = thmplain(
"item",
@ -319,6 +326,7 @@
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)
#let definition = thmplain(
"item",
@ -326,4 +334,5 @@
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)

View file

@ -66,14 +66,16 @@
set heading(numbering: "1.")
show heading: it => {
set text(font: "Libertinus Serif")
set par(first-line-indent: 0em)
if it.numbering != none {
text(rgb("#2196F3"), weight: 500)[#sym.section]
block[
#if it.numbering != none {
text(rgb("#2196F3"), weight: 500)[#sym.section]
text(rgb("#2196F3"))[#counter(heading).display() ]
}
it.body
text(rgb("#2196F3"))[#counter(heading).display() ]
}
#it.body
#v(0.5em)
]
}
set text(font: "New Computer Modern", lang: "en")
@ -126,7 +128,8 @@
// Main body.
set par(
justify: true,
first-line-indent: 1em,
spacing: 0.65em,
first-line-indent: 2em,
)
body
@ -170,7 +173,7 @@
namefmt: x => [(#x)],
titlefmt: strong,
bodyfmt: x => x,
separator: [#h(0.1em).#h(0.2em) \ ],
separator: [. \ ],
base: "heading",
base_level: none,
) = {
@ -190,7 +193,7 @@
title += " " + number
}
title = titlefmt(title)
body = bodyfmt(body)
body = [#pad(top: 2pt, bodyfmt(body))]
pad(
..padding,
showybox(
@ -200,7 +203,9 @@
padding: (top: 0em, bottom: 0em),
..blockargs.named(),
..blockargs_individual.named(),
[#title#name#titlefmt(separator)#body],
[
#title#name#titlefmt(separator)#body
],
),
)
}
@ -286,6 +291,7 @@
#let example = example-style("item", "Example")
#let proof(body, name: none) = {
v(0.5em)
[_Proof_]
if name != none {
[ #thmname[#name]]
@ -303,6 +309,7 @@
sym.space.nobreak
$square.stroked$
v(0.5em)
}
#let fact = thmplain(
@ -310,8 +317,8 @@
"Fact",
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)
#let abuse = thmplain(
"item",
@ -319,6 +326,7 @@
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)
#let definition = thmplain(
"item",
@ -326,4 +334,5 @@
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)

View file

@ -116,3 +116,19 @@ middle_, these comprise the axioms of a system of propositional logic.
+ $and$ connects the smallest propositions surrounding it.
+ $or$ connects the smallest propositions surrounding it.
]
= Notes on Logic and Proofs, 1.2
_Prototypical example for this section:_ If $sin pi = 1$, then $6$ is prime.
#definition[
For a *antedecent* $P$ and *consequent* $Q$, the *conditional sentence* $P =>
Q$ is the proposition "If $P$, then $Q$."
]
#remark[
The statement $P => Q$ states $P$ _implies_ $Q$ and is only false if $P$ is
true and $Q$ is false, since this is the only case where $P$ did not imply $Q$.
]
A conditional may be true even when the antedecent and consequent are unrelated.

View file

@ -66,14 +66,16 @@
set heading(numbering: "1.")
show heading: it => {
set text(font: "Libertinus Serif")
set par(first-line-indent: 0em)
if it.numbering != none {
text(rgb("#2196F3"), weight: 500)[#sym.section]
block[
#if it.numbering != none {
text(rgb("#2196F3"), weight: 500)[#sym.section]
text(rgb("#2196F3"))[#counter(heading).display() ]
}
it.body
text(rgb("#2196F3"))[#counter(heading).display() ]
}
#it.body
#v(0.5em)
]
}
set text(font: "New Computer Modern", lang: "en")
@ -126,7 +128,8 @@
// Main body.
set par(
justify: true,
first-line-indent: 1em,
spacing: 0.65em,
first-line-indent: 2em,
)
body
@ -170,7 +173,7 @@
namefmt: x => [(#x)],
titlefmt: strong,
bodyfmt: x => x,
separator: [#h(0.1em).#h(0.2em) \ ],
separator: [. \ ],
base: "heading",
base_level: none,
) = {
@ -190,7 +193,7 @@
title += " " + number
}
title = titlefmt(title)
body = bodyfmt(body)
body = [#pad(top: 2pt, bodyfmt(body))]
pad(
..padding,
showybox(
@ -200,7 +203,9 @@
padding: (top: 0em, bottom: 0em),
..blockargs.named(),
..blockargs_individual.named(),
[#title#name#titlefmt(separator)#body],
[
#title#name#titlefmt(separator)#body
],
),
)
}
@ -286,6 +291,7 @@
#let example = example-style("item", "Example")
#let proof(body, name: none) = {
v(0.5em)
[_Proof_]
if name != none {
[ #thmname[#name]]
@ -303,6 +309,7 @@
sym.space.nobreak
$square.stroked$
v(0.5em)
}
#let fact = thmplain(
@ -310,8 +317,8 @@
"Fact",
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)
#let abuse = thmplain(
"item",
@ -319,6 +326,7 @@
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)
#let definition = thmplain(
"item",
@ -326,4 +334,5 @@
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)

View file

@ -66,14 +66,16 @@
set heading(numbering: "1.")
show heading: it => {
set text(font: "Libertinus Serif")
set par(first-line-indent: 0em)
if it.numbering != none {
text(rgb("#2196F3"), weight: 500)[#sym.section]
block[
#if it.numbering != none {
text(rgb("#2196F3"), weight: 500)[#sym.section]
text(rgb("#2196F3"))[#counter(heading).display() ]
}
it.body
text(rgb("#2196F3"))[#counter(heading).display() ]
}
#it.body
#v(0.5em)
]
}
set text(font: "New Computer Modern", lang: "en")
@ -126,7 +128,8 @@
// Main body.
set par(
justify: true,
first-line-indent: 1em,
spacing: 0.65em,
first-line-indent: 2em,
)
body
@ -170,7 +173,7 @@
namefmt: x => [(#x)],
titlefmt: strong,
bodyfmt: x => x,
separator: [#h(0.1em).#h(0.2em) \ ],
separator: [. \ ],
base: "heading",
base_level: none,
) = {
@ -190,7 +193,7 @@
title += " " + number
}
title = titlefmt(title)
body = bodyfmt(body)
body = [#pad(top: 2pt, bodyfmt(body))]
pad(
..padding,
showybox(
@ -200,7 +203,9 @@
padding: (top: 0em, bottom: 0em),
..blockargs.named(),
..blockargs_individual.named(),
[#title#name#titlefmt(separator)#body],
[
#title#name#titlefmt(separator)#body
],
),
)
}
@ -286,6 +291,7 @@
#let example = example-style("item", "Example")
#let proof(body, name: none) = {
v(0.5em)
[_Proof_]
if name != none {
[ #thmname[#name]]
@ -303,6 +309,7 @@
sym.space.nobreak
$square.stroked$
v(0.5em)
}
#let fact = thmplain(
@ -310,8 +317,8 @@
"Fact",
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)
#let abuse = thmplain(
"item",
@ -319,6 +326,7 @@
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)
#let definition = thmplain(
"item",
@ -326,4 +334,5 @@
titlefmt: strong,
separator: ".",
inset: 0pt,
padding: (bottom: 0.5em, top: 0.5em),
)