updated CeTZ to v0.4.0
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user