Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06766ffa0d | ||
|
|
d85de92c2e | ||
|
|
8ad72aa225 | ||
|
|
bbba00592d | ||
|
|
47cf7ae583 | ||
|
|
2e9e072158 | ||
|
|
4b0979893b | ||
|
|
771760632d | ||
|
|
80f015a1ad | ||
|
|
1ef109fcf9 | ||
|
|
a9f262656c | ||
|
|
40a466859c | ||
|
|
c359bc007c | ||
|
|
9ed3bfdf0d | ||
|
|
69baada6d5 | ||
|
|
21b33e74a6 | ||
|
|
52e2278f4d | ||
|
|
19c6be7357 | ||
|
|
4436f141eb | ||
|
|
d498205e42 | ||
|
|
b74be29ee6 | ||
|
|
61e1d39248 | ||
|
|
841ea6cdc2 | ||
|
|
34f9f921b2 | ||
|
|
ff05f7996a | ||
|
|
91834e7164 | ||
|
|
b1a604e91c | ||
|
|
e5fb9835f4 | ||
|
|
edbabac625 | ||
|
|
a38c3754aa | ||
|
|
60567ce745 | ||
|
|
0a13243240 | ||
|
|
26fc1f769e | ||
|
|
65c2506188 | ||
|
|
52087756d9 | ||
|
|
d855a22c7b | ||
|
|
b9434226bb |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 160 KiB |
|
After Width: | Height: | Size: 156 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 180 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 359 KiB |
|
After Width: | Height: | Size: 155 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 399 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 40 KiB |
@@ -25,39 +25,39 @@
|
||||
// })
|
||||
// }
|
||||
|
||||
#let definition(body, name: none) = {
|
||||
#let definition(body, name: none, numbered: false) = {
|
||||
// show figure: statement-style(name, numbered: false)
|
||||
figure(
|
||||
//
|
||||
body,
|
||||
kind: "definition",
|
||||
supplement: {
|
||||
[Definizione]
|
||||
if name != none {
|
||||
[ -- ]
|
||||
name
|
||||
}
|
||||
supplement: if name != none {
|
||||
[#name]
|
||||
},
|
||||
numbering: if numbered {
|
||||
"1"
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
#let fact(body, name: none) = {
|
||||
#let fact(body, numbered: false, name: none) = {
|
||||
// show figure: statement-style(name, numbered: false)
|
||||
figure(
|
||||
body,
|
||||
kind: "fact",
|
||||
supplement: {
|
||||
[Fatto]
|
||||
if name != none {
|
||||
[ -- ]
|
||||
name
|
||||
}
|
||||
},
|
||||
)
|
||||
figure(body, kind: "fact", supplement: {
|
||||
[Fatto]
|
||||
if name != none {
|
||||
[ -- ]
|
||||
name
|
||||
}
|
||||
}, numbering: if numbered { "1" })
|
||||
}
|
||||
|
||||
#let observation(body) = {
|
||||
// show figure: statement-style(name, numbered: false)
|
||||
figure(body, kind: "observation", supplement: [Osservazione], numbering: "1")
|
||||
}
|
||||
|
||||
#let proposition(body, numbered: true) = {
|
||||
// show figure: statement-style(name, numbered: numbered)
|
||||
|
||||
return figure(
|
||||
body,
|
||||
// kind: "proposition",
|
||||
@@ -80,17 +80,12 @@
|
||||
|
||||
#let theorem(body, name: none, numbered: true) = {
|
||||
// show figure: statement-style(name, numbered: numbered)
|
||||
figure(
|
||||
body,
|
||||
kind: "theorem",
|
||||
supplement: {
|
||||
[Teorema]
|
||||
if name != none {
|
||||
[ (#name)]
|
||||
}
|
||||
},
|
||||
numbering: if numbered { "1" },
|
||||
)
|
||||
figure(body, kind: "theorem", supplement: {
|
||||
[Teorema]
|
||||
if name != none {
|
||||
[ (#name) ]
|
||||
}
|
||||
}, numbering: if numbered { "1" })
|
||||
}
|
||||
|
||||
#let proof(body) = block({
|
||||
@@ -125,34 +120,41 @@
|
||||
}
|
||||
|
||||
#let todo-color = color.mix((red, 10%), (yellow, 90%))
|
||||
#let todo(content) = block(
|
||||
breakable: false,
|
||||
grid(
|
||||
rows: 2,
|
||||
align: left,
|
||||
block(
|
||||
fill: todo-color.desaturate(60%),
|
||||
inset: (x: 0.5em, y: 0.35em),
|
||||
radius: (top: 0.25em),
|
||||
{
|
||||
set text(fill: black.transparentize(15%), size: 8pt, font: "Open Sans")
|
||||
[*TODO*]
|
||||
},
|
||||
),
|
||||
block(
|
||||
width: 100%,
|
||||
fill: todo-color.desaturate(75%),
|
||||
inset: (x: 0.5em, y: 0.5em),
|
||||
radius: (bottom: 0.25em, top-right: 0.25em),
|
||||
{
|
||||
set text(fill: black.transparentize(15%), size: 9pt, font: "Open Sans")
|
||||
content
|
||||
},
|
||||
),
|
||||
#let todo(content) = block(breakable: false, grid(
|
||||
rows: 2,
|
||||
align: left,
|
||||
block(fill: todo-color.desaturate(60%), inset: (x: 0.5em, y: 0.35em), radius: (top: 0.25em), {
|
||||
set text(fill: black.transparentize(15%), size: 8pt, font: "Open Sans")
|
||||
[*TODO*]
|
||||
}),
|
||||
block(
|
||||
width: 100%,
|
||||
fill: todo-color.desaturate(75%),
|
||||
inset: (x: 0.5em, y: 0.5em),
|
||||
radius: (bottom: 0.25em, top-right: 0.25em),
|
||||
{
|
||||
set text(fill: black.transparentize(15%), size: 9pt, font: "Open Sans")
|
||||
content
|
||||
},
|
||||
),
|
||||
)
|
||||
))
|
||||
|
||||
#let scr(it) = text(
|
||||
features: ("ss01",),
|
||||
box($cal(it)$),
|
||||
)
|
||||
#let scr(it) = text(features: ("ss01",), box($cal(it)$))
|
||||
|
||||
#let blank = {
|
||||
$#h(0.125em) #{
|
||||
rect(width: 0.8em * 1.41, height: 0.8em, stroke: 0.5pt, place(dx: -0.2em, dy: -0.55em, {
|
||||
set text(size: 10pt)
|
||||
|
||||
$dots$
|
||||
}))
|
||||
} #h(0.125em)$
|
||||
}
|
||||
|
||||
#let marker(content) = metadata(("marker", content))
|
||||
|
||||
#let qquad = h(2em)
|
||||
|
||||
#let diff-add(body) = block(fill: green.mix(white), outset: (x: 2pt, y: 3pt), radius: 2pt, body)
|
||||
|
||||
#let diff-del(body) = block(fill: red.mix(white), outset: (x: 2pt, y: 3pt), radius: 2pt, body)
|
||||
|
||||
@@ -0,0 +1,302 @@
|
||||
#import "@preview/touying:0.6.1": *
|
||||
|
||||
#let _tblock(self: none, title: none, it) = {
|
||||
grid(
|
||||
columns: 1,
|
||||
row-gutter: 0pt,
|
||||
block(
|
||||
fill: self.colors.primary-dark,
|
||||
width: 100%,
|
||||
radius: (top: 6pt),
|
||||
inset: (top: 0.4em, bottom: 0.3em, left: 0.5em, right: 0.5em),
|
||||
text(fill: self.colors.neutral-lightest, weight: "bold", title),
|
||||
),
|
||||
rect(
|
||||
fill: gradient.linear(self.colors.primary-dark, self.colors.primary.lighten(90%), angle: 90deg),
|
||||
width: 100%,
|
||||
height: 4pt,
|
||||
),
|
||||
block(
|
||||
fill: self.colors.primary.lighten(90%),
|
||||
width: 100%,
|
||||
radius: (bottom: 6pt),
|
||||
inset: (top: 0.4em, bottom: 0.5em, left: 0.5em, right: 0.5em),
|
||||
it,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
#let tblock(title: none, it) = touying-fn-wrapper(_tblock.with(title: title, it))
|
||||
|
||||
#let slide(
|
||||
title: auto,
|
||||
header: auto,
|
||||
footer: auto,
|
||||
align: auto,
|
||||
config: (:),
|
||||
repeat: auto,
|
||||
setting: body => body,
|
||||
composer: auto,
|
||||
..bodies,
|
||||
) = touying-slide-wrapper(self => {
|
||||
if align != auto {
|
||||
self.store.align = align
|
||||
}
|
||||
if title != auto {
|
||||
self.store.title = title
|
||||
}
|
||||
if header != auto {
|
||||
self.store.header = header
|
||||
}
|
||||
if footer != auto {
|
||||
self.store.footer = footer
|
||||
}
|
||||
let new-setting = body => {
|
||||
show: std.align.with(self.store.align)
|
||||
show: setting
|
||||
body
|
||||
}
|
||||
touying-slide(self: self, config: config, repeat: repeat, setting: new-setting, composer: composer, ..bodies)
|
||||
})
|
||||
|
||||
#let title-slide(config: (:), ..args) = touying-slide-wrapper(self => {
|
||||
self = utils.merge-dicts(self, config)
|
||||
self.store.title = none
|
||||
let info = self.info + args.named()
|
||||
info.authors = {
|
||||
let authors = if "authors" in info {
|
||||
info.authors
|
||||
} else {
|
||||
info.author
|
||||
}
|
||||
if type(authors) == array {
|
||||
authors
|
||||
} else {
|
||||
(authors,)
|
||||
}
|
||||
}
|
||||
let body = {
|
||||
show: std.align.with(center + horizon)
|
||||
block(fill: self.colors.primary, inset: 1.5em, radius: 0.5em, breakable: false, {
|
||||
text(size: 1.2em, fill: self.colors.neutral-lightest, weight: "bold", info.title)
|
||||
if info.subtitle != none {
|
||||
parbreak()
|
||||
text(size: 1.0em, fill: self.colors.neutral-lightest, weight: "bold", info.subtitle)
|
||||
}
|
||||
})
|
||||
// authors
|
||||
grid(
|
||||
columns: (1fr,) * calc.min(info.authors.len(), 3),
|
||||
column-gutter: 1em,
|
||||
row-gutter: 1em,
|
||||
..info.authors.map(author => text(fill: black, author)),
|
||||
)
|
||||
v(0.5em)
|
||||
// institution
|
||||
if info.institution != none {
|
||||
parbreak()
|
||||
text(size: 0.8em, info.institution)
|
||||
}
|
||||
// date
|
||||
if info.date != none {
|
||||
parbreak()
|
||||
text(size: 1.0em, utils.display-info-date(self))
|
||||
}
|
||||
}
|
||||
touying-slide(self: self, body)
|
||||
})
|
||||
|
||||
#let outline-slide(
|
||||
config: (:),
|
||||
title: utils.i18n-outline-title,
|
||||
numbered: true,
|
||||
level: none,
|
||||
..args,
|
||||
) = touying-slide-wrapper(self => {
|
||||
self.store.title = "Indice"
|
||||
touying-slide(self: self, config: config, std.align(
|
||||
self.store.align,
|
||||
components.adaptive-columns({
|
||||
text(fill: self.colors.primary, weight: 600, components.custom-progressive-outline(
|
||||
level: level,
|
||||
alpha: self.store.alpha,
|
||||
indent: (0em, 1em),
|
||||
vspace: (.4em,),
|
||||
numbered: (numbered,),
|
||||
depth: 1,
|
||||
..args.named(),
|
||||
))
|
||||
})
|
||||
+ args.pos().sum(default: none),
|
||||
))
|
||||
})
|
||||
|
||||
#let new-section-slide(
|
||||
config: (:),
|
||||
title: utils.i18n-outline-title,
|
||||
level: 1,
|
||||
numbered: true,
|
||||
..args,
|
||||
body,
|
||||
) = outline-slide(config: config, title: title, level: level, numbered: numbered, ..args, body)
|
||||
|
||||
#let focus-slide(config: (:), align: horizon + center, body) = touying-slide-wrapper(self => {
|
||||
self = utils.merge-dicts(self, config-common(freeze-slide-counter: true), config-page(
|
||||
fill: self.colors.primary,
|
||||
margin: 2em,
|
||||
header: none,
|
||||
footer: none,
|
||||
))
|
||||
set text(fill: self.colors.neutral-lightest, weight: "bold", size: 1.5em)
|
||||
touying-slide(self: self, config: config, std.align(align, body))
|
||||
})
|
||||
|
||||
#let ending-slide(config: (:), title: none, body) = touying-slide-wrapper(self => {
|
||||
let content = {
|
||||
set std.align(center + horizon)
|
||||
if title != none {
|
||||
block(fill: self.colors.tertiary, inset: (top: 0.7em, bottom: 0.7em, left: 3em, right: 3em), radius: 0.5em, text(
|
||||
size: 1.5em,
|
||||
fill: self.colors.neutral-lightest,
|
||||
title,
|
||||
))
|
||||
}
|
||||
body
|
||||
}
|
||||
touying-slide(self: self, config: config, content)
|
||||
})
|
||||
|
||||
#let dm-unipi-theme(
|
||||
aspect-ratio: "16-9",
|
||||
align: horizon,
|
||||
alpha: 20%,
|
||||
title: self => utils.display-current-heading(depth: self.slide-level),
|
||||
header-right: self => self.info.logo,
|
||||
progress-bar: true,
|
||||
footer-columns: (25%, 1fr, 5em),
|
||||
footer-a: self => self.info.author,
|
||||
footer-c: self => if self.info.short-title == auto {
|
||||
self.info.title
|
||||
} else {
|
||||
self.info.short-title
|
||||
},
|
||||
footer-d: context utils.slide-counter.display() + " / " + utils.last-slide-number,
|
||||
..args,
|
||||
body,
|
||||
) = {
|
||||
let header(self) = {
|
||||
set std.align(top)
|
||||
grid(
|
||||
rows: (auto, auto),
|
||||
utils.call-or-display(self, self.store.navigation),
|
||||
utils.call-or-display(self, self.store.header),
|
||||
)
|
||||
}
|
||||
let footer(self) = {
|
||||
set text(size: .5em)
|
||||
set std.align(center + bottom)
|
||||
grid(
|
||||
rows: (auto, auto),
|
||||
utils.call-or-display(self, self.store.footer),
|
||||
if self.store.progress-bar {
|
||||
utils.call-or-display(self, components.progress-bar(
|
||||
height: 2pt,
|
||||
self.colors.primary,
|
||||
self.colors.neutral-lightest,
|
||||
))
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
show: touying-slides.with(
|
||||
config-page(
|
||||
paper: "presentation-" + aspect-ratio,
|
||||
header: header,
|
||||
footer: footer,
|
||||
header-ascent: 0em,
|
||||
footer-descent: 0em,
|
||||
margin: (top: 3.5em, bottom: 2.5em, x: 2.5em),
|
||||
),
|
||||
config-common(slide-fn: slide, new-section-slide-fn: new-section-slide),
|
||||
config-methods(
|
||||
init: (self: none, body) => {
|
||||
set text(size: 18pt, font: "Open Sans")
|
||||
set par(leading: 0.75em)
|
||||
set list(marker: {
|
||||
place(top + left, dy: 0.2em, circle(fill: self.colors.primary, radius: 3pt))
|
||||
h(0.25em)
|
||||
})
|
||||
show figure.caption: set text(size: 0.6em)
|
||||
show footnote.entry: set text(size: 0.6em)
|
||||
show heading: set text(fill: self.colors.primary)
|
||||
show link: it => if type(it.dest) == str {
|
||||
set text(fill: self.colors.primary)
|
||||
it
|
||||
} else {
|
||||
it
|
||||
}
|
||||
show figure.where(kind: table): set figure.caption(position: top)
|
||||
|
||||
body
|
||||
},
|
||||
alert: utils.alert-with-primary-color,
|
||||
tblock: _tblock,
|
||||
),
|
||||
config-colors(
|
||||
primary: rgb("#003c71"),
|
||||
primary-dark: rgb("#005baa"),
|
||||
secondary: rgb("#ffffff"),
|
||||
neutral-lightest: rgb("#ffffff"),
|
||||
neutral-darkest: rgb("#001c35"),
|
||||
),
|
||||
config-store(
|
||||
align: align,
|
||||
alpha: alpha,
|
||||
title: title,
|
||||
header-right: header-right,
|
||||
progress-bar: progress-bar,
|
||||
footer-columns: footer-columns,
|
||||
footer-a: footer-a,
|
||||
footer-c: footer-c,
|
||||
footer-d: footer-d,
|
||||
navigation: self => components.simple-navigation(
|
||||
self: self,
|
||||
primary: white,
|
||||
secondary: gray,
|
||||
background: self.colors.neutral-darkest,
|
||||
logo: utils.call-or-display(self, self.store.header-right),
|
||||
),
|
||||
header: self => if self.store.title != none {
|
||||
block(width: 100%, height: 2em, fill: self.colors.primary, place(
|
||||
left + horizon,
|
||||
text(fill: self.colors.neutral-lightest, weight: 600, size: 1.2em, utils.call-or-display(
|
||||
self,
|
||||
self.store.title,
|
||||
)),
|
||||
dx: 1.5em,
|
||||
))
|
||||
},
|
||||
footer: self => {
|
||||
let cell(fill: none, it) = rect(
|
||||
width: 100%,
|
||||
height: 100%,
|
||||
inset: 1mm,
|
||||
outset: 0mm,
|
||||
fill: fill,
|
||||
stroke: none,
|
||||
std.align(horizon, text(fill: self.colors.neutral-lightest, it)),
|
||||
)
|
||||
grid(
|
||||
columns: self.store.footer-columns,
|
||||
rows: (1.5em, auto),
|
||||
cell(fill: self.colors.neutral-darkest, utils.call-or-display(self, self.store.footer-a)),
|
||||
cell(fill: self.colors.primary, utils.call-or-display(self, self.store.footer-c)),
|
||||
cell(fill: self.colors.primary, utils.call-or-display(self, self.store.footer-d)),
|
||||
)
|
||||
},
|
||||
),
|
||||
..args,
|
||||
)
|
||||
|
||||
body
|
||||
}
|
||||
@@ -44,3 +44,13 @@
|
||||
year = {1977},
|
||||
publisher = {Springer New York}
|
||||
}
|
||||
|
||||
@book{lickorish1997introduction,
|
||||
title = {An Introduction to Knot Theory},
|
||||
author = {Lickorish, W.B.R.},
|
||||
isbn = {9780387982540},
|
||||
lccn = {97016660},
|
||||
series = {Graduate Texts in Mathematics},
|
||||
year = {1997},
|
||||
publisher = {Springer New York}
|
||||
}
|
||||
@@ -23,6 +23,8 @@ for i in $(seq 0 3); do
|
||||
X_OFFSET=$(( i * TILE_WIDTH ))
|
||||
TEMP_FILE="_temp_${i}.png"
|
||||
OUTPUT_FILE=$(printf "$OUTPUT_TEMPLATE" "$i")
|
||||
|
||||
echo "Generating tile $i: $OUTPUT_FILE"
|
||||
|
||||
magick "$INPUT_IMAGE" -crop "${TILE_WIDTH}x${TILE_HEIGHT}+${X_OFFSET}+0" +repage "$TEMP_FILE"
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
// draw the black line
|
||||
set-style(..cetz.styles.resolve(style, base: (stroke: (paint: black, thickness: size-factor * 0.75pt, cap: "round"))))
|
||||
polyline
|
||||
|
||||
// set-style(stroke: (paint: black, thickness: thickness, cap: "round"))
|
||||
}
|
||||
|
||||
@@ -84,6 +83,57 @@
|
||||
draw-strand({ hobby((-1.5, +1), (-1, +1), (0.5, 0), (0.1, -1), (0, -1)) })
|
||||
draw-strand({ hobby((1.5, +1), (1, +1), (-0.5, 0), (-0.1, -1), (0, -1)) })
|
||||
}),
|
||||
//
|
||||
// Large
|
||||
//
|
||||
unit-large: skein-canvas(size-factor: 1.5, {
|
||||
import cetz.draw: *
|
||||
|
||||
circle((0, 0), radius: 1, stroke: (paint: black, thickness: 0.75pt))
|
||||
}),
|
||||
over-large: skein-canvas(size-factor: 1.5, {
|
||||
import cetz.draw: *
|
||||
draw-strand({ line((-1, -1), (1, 1)) })
|
||||
draw-strand({ line((-1, 1), (1, -1)) })
|
||||
}),
|
||||
under-large: skein-canvas(size-factor: 1.5, {
|
||||
import cetz.draw: *
|
||||
draw-strand({ line((-1, 1), (1, -1)) })
|
||||
draw-strand({ line((-1, -1), (1, 1)) })
|
||||
}),
|
||||
h-large: skein-canvas(size-factor: 1.5, {
|
||||
import cetz.draw: *
|
||||
draw-strand({ hobby((-1, -1), (0, -0.61), (1, -1), omega: 1) })
|
||||
draw-strand({ hobby((-1, 1), (0, +0.61), (1, 1), omega: 1) })
|
||||
}),
|
||||
v-large: skein-canvas(size-factor: 1.5, {
|
||||
import cetz.draw: *
|
||||
draw-strand({ hobby((-1, -1), (-0.61, 0), (-1, 1), omega: 1) })
|
||||
draw-strand({ hobby((1, -1), (+0.61, 0), (1, 1), omega: 1) })
|
||||
}),
|
||||
strand-large: skein-canvas(size-factor: 1.5, {
|
||||
import cetz.draw: *
|
||||
rect((-1, -1), (1, 1), fill: white, stroke: none)
|
||||
draw-strand({ hobby((-1, 0), (0, 0.25), (1, 0), omega: 1) })
|
||||
}),
|
||||
over-twist-large: skein-canvas(size-factor: 1.5, {
|
||||
import cetz.draw: *
|
||||
draw-strand({ hobby((1.5, +1), (1, +1), (-0.5, 0), (-0.1, -1), (0, -1)) })
|
||||
draw-strand({ hobby((-1.5, +1), (-1, +1), (0.5, 0), (0.1, -1), (0, -1)) })
|
||||
}),
|
||||
under-twist-large: skein-canvas(size-factor: 1.5, {
|
||||
import cetz.draw: *
|
||||
draw-strand({ hobby((-1.5, +1), (-1, +1), (0.5, 0), (0.1, -1), (0, -1)) })
|
||||
draw-strand({ hobby((1.5, +1), (1, +1), (-0.5, 0), (-0.1, -1), (0, -1)) })
|
||||
}),
|
||||
//
|
||||
// Medium
|
||||
//
|
||||
unit-medium: skein-canvas(size-factor: medium-scale-factor, {
|
||||
import cetz.draw: *
|
||||
|
||||
circle((0, 0), radius: 1, stroke: (paint: black, thickness: 0.75pt))
|
||||
}),
|
||||
strand-medium: skein-canvas(size-factor: medium-scale-factor, {
|
||||
import cetz.draw: *
|
||||
rect((-1, -1), (1, 1), fill: white, stroke: none)
|
||||
@@ -94,6 +144,14 @@
|
||||
draw-strand(size-factor: medium-scale-factor, { hobby((1.5, +1), (1, +1), (-0.5, 0), (-0.1, -1), (0, -1)) })
|
||||
draw-strand(size-factor: medium-scale-factor, { hobby((-1.5, +1), (-1, +1), (0.5, 0), (0.1, -1), (0, -1)) })
|
||||
}),
|
||||
under-twist-medium: skein-canvas(size-factor: medium-scale-factor, {
|
||||
import cetz.draw: *
|
||||
draw-strand(size-factor: small-scale-factor, { hobby((-1.5, +1), (-1, +1), (0.5, 0), (0.1, -1), (0, -1)) })
|
||||
draw-strand(size-factor: small-scale-factor, { hobby((1.5, +1), (1, +1), (-0.5, 0), (-0.1, -1), (0, -1)) })
|
||||
}),
|
||||
//
|
||||
// Small
|
||||
//
|
||||
strand-small: skein-canvas(size-factor: small-scale-factor, {
|
||||
import cetz.draw: *
|
||||
rect((-1, -1), (1, 1), fill: white, stroke: none)
|
||||
@@ -111,22 +169,16 @@
|
||||
}),
|
||||
)
|
||||
|
||||
|
||||
#let skein-generic(
|
||||
kind: "over",
|
||||
direction: (+1, +1),
|
||||
arrows: (true, true),
|
||||
styles: ((:), (:)),
|
||||
) = {
|
||||
skein-canvas({
|
||||
#let skein-generic(kind: "over", direction: (+1, +1), arrows: (true, true), styles: ((:), (:)), size-factor: 1.0) = {
|
||||
skein-canvas(size-factor: size-factor, {
|
||||
import cetz.draw: *
|
||||
if kind == "over" {
|
||||
draw-strand({ line((-1, -1), (1, 1)) }, style: styles.at(1))
|
||||
draw-strand({ line((-1, 1), (1, -1)) }, style: styles.at(0))
|
||||
draw-strand(size-factor: size-factor, { line((-1, -1), (1, 1)) }, style: styles.at(1))
|
||||
draw-strand(size-factor: size-factor, { line((-1, 1), (1, -1)) }, style: styles.at(0))
|
||||
}
|
||||
if kind == "under" {
|
||||
draw-strand({ line((-1, 1), (1, -1)) }, style: styles.at(0))
|
||||
draw-strand({ line((-1, -1), (1, 1)) }, style: styles.at(1))
|
||||
draw-strand(size-factor: size-factor, { line((-1, 1), (1, -1)) }, style: styles.at(0))
|
||||
draw-strand(size-factor: size-factor, { line((-1, -1), (1, 1)) }, style: styles.at(1))
|
||||
}
|
||||
|
||||
if arrows.at(0) {
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
// top: 4.5cm,
|
||||
// bottom: 3.5cm,
|
||||
),
|
||||
|
||||
header-ascent: 1cm,
|
||||
header: context {
|
||||
let i = counter(page).get().first()
|
||||
@@ -68,14 +67,10 @@
|
||||
set text(size: script-size)
|
||||
align(center, upper(page-title))
|
||||
},
|
||||
|
||||
footer-descent: 1cm,
|
||||
footer: context {
|
||||
let i = counter(page).get().first()
|
||||
align(
|
||||
center,
|
||||
[#i],
|
||||
)
|
||||
align(center, [#i])
|
||||
},
|
||||
)
|
||||
|
||||
@@ -90,19 +85,8 @@
|
||||
|
||||
let heading-size = heading-level-size(it.level)
|
||||
|
||||
set text(
|
||||
size: heading-size,
|
||||
fill: luma(10%),
|
||||
weight: 600,
|
||||
top-edge: "bounds",
|
||||
bottom-edge: "baseline",
|
||||
)
|
||||
set par(
|
||||
spacing: 0pt,
|
||||
hanging-indent: 0pt,
|
||||
first-line-indent: 0pt,
|
||||
)
|
||||
|
||||
set text(size: heading-size, fill: luma(10%), weight: 600, top-edge: "bounds", bottom-edge: "baseline")
|
||||
set par(spacing: 0pt, hanging-indent: 0pt, first-line-indent: 0pt)
|
||||
|
||||
if it.level == 1 {
|
||||
if counter(heading).get() != (0,) {
|
||||
@@ -111,20 +95,14 @@
|
||||
|
||||
stack(
|
||||
dir: ttb,
|
||||
..(
|
||||
if counter(heading).get() != (0,) {
|
||||
(
|
||||
layout(size => v(size.height * 25%)),
|
||||
{
|
||||
set text(size: heading-level-size(3))
|
||||
[Capitolo ]
|
||||
set text(size: heading-level-size(2))
|
||||
counter(heading).display("1")
|
||||
},
|
||||
v(heading-size * 0.61),
|
||||
)
|
||||
}
|
||||
),
|
||||
..(if counter(heading).get() != (0,) {
|
||||
(layout(size => v(size.height * 25%)), {
|
||||
set text(size: heading-level-size(3))
|
||||
[Capitolo ]
|
||||
set text(size: heading-level-size(2))
|
||||
counter(heading).display("1")
|
||||
}, v(heading-size * 0.61),)
|
||||
}),
|
||||
line(length: 100%),
|
||||
v(heading-size * 0.61),
|
||||
align(right, it.body),
|
||||
@@ -169,10 +147,7 @@
|
||||
show math.equation: set block(below: normal-size * 1.5, above: normal-size * 1.5)
|
||||
show math.equation: set text(weight: 400)
|
||||
|
||||
set math.equation(
|
||||
numbering: "(1)",
|
||||
supplement: none,
|
||||
)
|
||||
set math.equation(numbering: "(1)", supplement: none)
|
||||
|
||||
show math.equation: it => {
|
||||
if it.block and not it.has("label") [
|
||||
@@ -194,41 +169,28 @@
|
||||
show raw.where(block: false): it => {
|
||||
set text(size: 7.25pt, fill: luma(7%))
|
||||
|
||||
box(
|
||||
outset: (x: 2pt, y: 3pt),
|
||||
fill: luma(92%),
|
||||
radius: 3pt,
|
||||
it,
|
||||
)
|
||||
box(outset: (x: 2pt, y: 3pt), fill: luma(92%), radius: 3pt, it)
|
||||
}
|
||||
|
||||
show raw.where(block: true): it => block(
|
||||
outset: (x: 2pt, y: 3pt),
|
||||
fill: luma(92%),
|
||||
radius: 4pt,
|
||||
inset: 4pt,
|
||||
it,
|
||||
)
|
||||
show raw.where(block: true): it => block(outset: (x: 2pt, y: 3pt), fill: luma(92%), radius: 4pt, inset: 4pt, it)
|
||||
|
||||
set std.bibliography(
|
||||
style: "ieee",
|
||||
title: none,
|
||||
)
|
||||
set std.bibliography(style: "ieee", title: none, full: true)
|
||||
|
||||
set figure(gap: 1em)
|
||||
show figure: set block(above: 1.5em, below: 1.5em)
|
||||
show figure: it => {
|
||||
// Customize the figure's caption.
|
||||
show figure.caption: caption => {
|
||||
set text(size: small-size)
|
||||
smallcaps(caption.supplement)
|
||||
show figure.caption: caption => block(inset: (x: 1.4em), {
|
||||
set align(left)
|
||||
set text(size: 10.5pt)
|
||||
smallcaps([Figura])
|
||||
if caption.numbering != none {
|
||||
[ ]
|
||||
numbering(caption.numbering, ..caption.counter.at(it.location()))
|
||||
}
|
||||
[. ]
|
||||
caption.body
|
||||
}
|
||||
})
|
||||
|
||||
// We want a bit of space around tables and images.
|
||||
show selector.or(table, image): pad.with(x: 2em)
|
||||
@@ -261,7 +223,20 @@
|
||||
|
||||
block({
|
||||
strong({
|
||||
it.supplement
|
||||
[Definizione]
|
||||
|
||||
if it.numbering != none {
|
||||
[ #(
|
||||
..counter(heading).get().slice(0, 1).map(it => str(it)),
|
||||
numbering(it.numbering, ..it.counter.at(it.location())),
|
||||
).join(".") ]
|
||||
}
|
||||
|
||||
if it.supplement != none {
|
||||
[ -- ]
|
||||
it.supplement
|
||||
}
|
||||
|
||||
[.]
|
||||
})
|
||||
[ ]
|
||||
@@ -274,12 +249,42 @@
|
||||
block({
|
||||
strong({
|
||||
it.supplement
|
||||
if it.numbering != none {
|
||||
[ ]
|
||||
// current chapter and section
|
||||
|
||||
[#(
|
||||
..counter(heading).get().slice(0, 1).map(it => str(it)),
|
||||
numbering(it.numbering, ..it.counter.at(it.location())),
|
||||
).join(".")]
|
||||
}
|
||||
[.]
|
||||
})
|
||||
it.body
|
||||
})
|
||||
}
|
||||
|
||||
show figure.where(kind: "observation"): it => {
|
||||
set align(start)
|
||||
block({
|
||||
strong({
|
||||
it.supplement
|
||||
if it.numbering != none {
|
||||
[ ]
|
||||
// current chapter and section
|
||||
|
||||
[#(
|
||||
..counter(heading).get().slice(0, 1).map(it => str(it)),
|
||||
numbering(it.numbering, ..it.counter.at(it.location())),
|
||||
).join(".")]
|
||||
}
|
||||
[.]
|
||||
})
|
||||
[ ]
|
||||
it.body
|
||||
})
|
||||
}
|
||||
|
||||
show figure.where(kind: "proposition"): it => {
|
||||
set align(start)
|
||||
block({
|
||||
@@ -346,102 +351,75 @@
|
||||
show ref: it => {
|
||||
if it.element != none {
|
||||
let el = it.element
|
||||
if el == figure {
|
||||
if el.kind == "proposition" or el.kind == "lemma" or el.kind == "theorem" {
|
||||
link(
|
||||
el.location(),
|
||||
{
|
||||
if it.supplement != auto { it.supplement } else { el.supplement }
|
||||
[ ]
|
||||
(
|
||||
..counter(heading).at(el.location()).slice(0, 1).map(it => str(it)),
|
||||
numbering(el.numbering, ..el.counter.at(el.location())),
|
||||
).join(".")
|
||||
},
|
||||
)
|
||||
}
|
||||
if el.func() == figure {
|
||||
link(el.location(), {
|
||||
if it.supplement != auto {
|
||||
it.supplement
|
||||
} else {
|
||||
if el.kind == "definition" {
|
||||
[Definizione]
|
||||
} else {
|
||||
el.supplement
|
||||
}
|
||||
}
|
||||
[ ]
|
||||
(
|
||||
..counter(heading).at(el.location()).slice(0, 1).map(it => str(it)),
|
||||
numbering(el.numbering, ..el.counter.at(el.location())),
|
||||
).join(".")
|
||||
})
|
||||
} else if el.func() == metadata and type(el.value) == array and el.value.at(0) == "marker" {
|
||||
link(el.location(), el.value.at(1))
|
||||
} else {
|
||||
it
|
||||
repr(it)
|
||||
}
|
||||
} else if it.citation != none {
|
||||
it
|
||||
}
|
||||
}
|
||||
|
||||
// Highlight ref
|
||||
// show ref: it => {
|
||||
// set text(fill: red.mix(black))
|
||||
// box(fill: red.mix(white), outset: (y: 0.5em), it)
|
||||
// }
|
||||
|
||||
// First thesis page
|
||||
context {
|
||||
set align(center + horizon)
|
||||
set text(size: 14pt)
|
||||
set page(
|
||||
margin: 0pt,
|
||||
header: none,
|
||||
footer: none,
|
||||
)
|
||||
set page(margin: 0pt, header: none, footer: none)
|
||||
|
||||
// show text: it => box(stroke: 1pt + red, it)
|
||||
// show grid: it => box(stroke: 1pt + red, it)
|
||||
|
||||
grid(
|
||||
columns: 1,
|
||||
image("assets/unipi.svg", width: 5cm),
|
||||
v(2em),
|
||||
{
|
||||
set text(size: 18pt)
|
||||
smallcaps[Università di Pisa]
|
||||
},
|
||||
grid(columns: 1, image("assets/unipi.svg", width: 5cm), v(2em), {
|
||||
set text(size: 18pt)
|
||||
smallcaps[Università di Pisa]
|
||||
}, v(1em), {
|
||||
line(length: 5.25cm)
|
||||
}, v(1em), [
|
||||
*Dipartimento di Matematica \ Corso di Laurea Triennale in Matematica*
|
||||
], v(6em), {
|
||||
[Tesi di Laurea]
|
||||
}, v(1em), {
|
||||
set text(size: 18pt)
|
||||
strong(page-title)
|
||||
}, v(15em), {
|
||||
block(width: 12cm, grid(columns: (1fr, 1fr), {
|
||||
set align(left)
|
||||
|
||||
v(1em),
|
||||
{
|
||||
line(length: 5.25cm)
|
||||
},
|
||||
[Relatore: \ *Prof. Paolo Lisca*]
|
||||
}, {
|
||||
set align(right)
|
||||
|
||||
v(1em),
|
||||
[
|
||||
*Dipartimento di Matematica \ Corso di Laurea Triennale in Matematica*
|
||||
],
|
||||
|
||||
v(6em),
|
||||
{
|
||||
[Tesi di Laurea]
|
||||
},
|
||||
|
||||
v(1em),
|
||||
{
|
||||
set text(size: 18pt)
|
||||
strong(page-title)
|
||||
},
|
||||
|
||||
v(15em),
|
||||
{
|
||||
block(
|
||||
width: 12cm,
|
||||
grid(
|
||||
columns: (1fr, 1fr),
|
||||
{
|
||||
set align(left)
|
||||
|
||||
[Relatore: \ *Prof. Paolo Lisca*]
|
||||
},
|
||||
{
|
||||
set align(right)
|
||||
|
||||
[Candidato: \ *Antonio De Lucreziis*]
|
||||
},
|
||||
),
|
||||
)
|
||||
},
|
||||
|
||||
v(6em),
|
||||
{
|
||||
line(length: 6cm)
|
||||
},
|
||||
|
||||
v(1em),
|
||||
[
|
||||
*Anno Accademico 2024/2025*
|
||||
],
|
||||
)
|
||||
[Candidato: \ *Antonio De Lucreziis*]
|
||||
}))
|
||||
}, v(6em), {
|
||||
line(length: 6cm)
|
||||
}, v(1em), [
|
||||
*Anno Accademico 2024/2025*
|
||||
])
|
||||
|
||||
pagebreak()
|
||||
}
|
||||
@@ -459,43 +437,26 @@
|
||||
// },
|
||||
// )
|
||||
|
||||
grid(rows: (auto, 1fr, 2fr), align: center + horizon, v(2em), {
|
||||
if abstract != none {
|
||||
pad(x: 2em, grid(columns: 1, {
|
||||
set text(size: 16pt)
|
||||
|
||||
grid(
|
||||
rows: (auto, 1fr, 2fr),
|
||||
align: center + horizon,
|
||||
v(2em),
|
||||
{
|
||||
if abstract != none {
|
||||
pad(
|
||||
x: 2em,
|
||||
grid(
|
||||
columns: 1,
|
||||
{
|
||||
set text(size: 16pt)
|
||||
[*Abstract*]
|
||||
}, v(1em), {
|
||||
set align(start)
|
||||
abstract
|
||||
}))
|
||||
}
|
||||
}, {
|
||||
set text(size: 16pt)
|
||||
[*Indice*]
|
||||
|
||||
[*Abstract*]
|
||||
},
|
||||
|
||||
v(1em),
|
||||
{
|
||||
set align(start)
|
||||
abstract
|
||||
},
|
||||
),
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
set text(size: 16pt)
|
||||
[*Indice*]
|
||||
|
||||
v(0.25em)
|
||||
|
||||
set text(size: 12pt)
|
||||
outline(title: none, depth: 2, indent: 1em)
|
||||
},
|
||||
)
|
||||
v(0.25em)
|
||||
|
||||
set text(size: 12pt)
|
||||
outline(title: none, depth: 2, indent: 1em)
|
||||
})
|
||||
|
||||
context { counter("fact").update(2) }
|
||||
|
||||
|
||||