updated CeTZ to v0.4.0
@ -1 +1 @@
|
||||
#import "@preview/cetz:0.3.4": *
|
||||
#import "@preview/cetz:0.4.0": *
|
@ -45,18 +45,14 @@
|
||||
(x0, y0),
|
||||
(x1, y1)
|
||||
)
|
||||
draw.merge-path(
|
||||
draw.line(
|
||||
(x0, y0),
|
||||
(x0 + w, y0),
|
||||
(x0 + w, y0 - h / 2),
|
||||
(x0 + w - 5, y0 - h),
|
||||
(x0, y0 - h),
|
||||
fill: COL-GRP-NAME,
|
||||
close: true,
|
||||
{
|
||||
draw.line(
|
||||
(x0, y0),
|
||||
(x0 + w, y0),
|
||||
(x0 + w, y0 - h / 2),
|
||||
(x0 + w - 5, y0 - h),
|
||||
(x0, y0 - h)
|
||||
)
|
||||
}
|
||||
close: true
|
||||
)
|
||||
draw.content(
|
||||
(x0, y0),
|
||||
|
@ -49,10 +49,6 @@
|
||||
return box(note.content, inset: inset)
|
||||
}
|
||||
|
||||
#let pre-render(note) = {
|
||||
|
||||
}
|
||||
|
||||
#let render(note, y: auto, forced: false) = {
|
||||
if not note.linked {
|
||||
if not note.aligned {
|
||||
@ -111,21 +107,22 @@
|
||||
let y1 = y0 - h
|
||||
|
||||
if note.shape == "default" {
|
||||
draw.merge-path(
|
||||
draw.line(
|
||||
(x0, y0),
|
||||
(x1, y0),
|
||||
(x2, y0 - NOTE-CORNER-SIZE),
|
||||
(x2, y1),
|
||||
(x0, y1),
|
||||
stroke: black + .5pt,
|
||||
fill: note.color,
|
||||
close: true,
|
||||
{
|
||||
draw.line(
|
||||
(x0, y0),
|
||||
(x1, y0),
|
||||
(x2, y0 - NOTE-CORNER-SIZE),
|
||||
(x2, y1),
|
||||
(x0, y1)
|
||||
)
|
||||
}
|
||||
close: true
|
||||
)
|
||||
draw.line(
|
||||
(x1, y0),
|
||||
(x1, y0 - NOTE-CORNER-SIZE),
|
||||
(x2, y0 - NOTE-CORNER-SIZE),
|
||||
stroke: black + .5pt
|
||||
)
|
||||
draw.line((x1, y0), (x1, y0 - NOTE-CORNER-SIZE), (x2, y0 - NOTE-CORNER-SIZE), stroke: black + .5pt)
|
||||
} else if note.shape == "rect" {
|
||||
draw.rect(
|
||||
(x0, y0),
|
||||
@ -137,20 +134,16 @@
|
||||
let lx = x0 + PAD.last()
|
||||
let rx = x2 - PAD.last()
|
||||
let my = (y0 + y1) / 2
|
||||
draw.merge-path(
|
||||
draw.line(
|
||||
(lx, y0),
|
||||
(rx, y0),
|
||||
(x2, my),
|
||||
(rx, y1),
|
||||
(lx, y1),
|
||||
(x0, my),
|
||||
stroke: black + .5pt,
|
||||
fill: note.color,
|
||||
close: true,
|
||||
{
|
||||
draw.line(
|
||||
(lx, y0),
|
||||
(rx, y0),
|
||||
(x2, my),
|
||||
(rx, y1),
|
||||
(lx, y1),
|
||||
(x0, my),
|
||||
)
|
||||
}
|
||||
close: true
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -15,10 +15,10 @@
|
||||
"": none,
|
||||
">": (symbol: ">", fill: color),
|
||||
">>": (symbol: "straight"),
|
||||
"\\": (symbol: ">", fill: color, harpoon: true, flip: true),
|
||||
"\\\\": (symbol: "straight", harpoon: true, flip: true),
|
||||
"/": (symbol: ">", fill: color, harpoon: true),
|
||||
"//": (symbol: "straight", harpoon: true),
|
||||
"\\": (symbol: ">", fill: color, harpoon: true),
|
||||
"\\\\": (symbol: "straight", harpoon: true),
|
||||
"/": (symbol: ">", fill: color, harpoon: true, flip: true),
|
||||
"//": (symbol: "straight", harpoon: true, flip: true),
|
||||
"x": none,
|
||||
"o": none,
|
||||
).at(sym)
|
||||
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |