Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Gekkio committed Feb 1, 2024
1 parent f079243 commit 2d56e8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions common.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "@preview/cetz:0.1.2"
#import "@preview/tablex:0.0.7": tablex, cellx, colspanx, hlinex
#import "@preview/cetz:0.2.0"
#import "@preview/tablex:0.0.8": tablex, cellx, colspanx, hlinex

#let monotext(..args) = text(font: "Anonymous Pro", fallback: false, ..args)

Expand Down
11 changes: 6 additions & 5 deletions timing.typ
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,18 @@
draw.group(name: "labels", {
for i in range(0, lanes.len()) {
let lane = lanes.at(i)
draw.content((0, i * y_step + 0.5), anchor: "right", lane.label)
draw.content((0, i * y_step + 0.5), anchor: "east", lane.label)
}
})
draw.group(name: "diagram", ctx => {
let (x, _, _) = cetz.coordinate.resolve(ctx, "labels.right")
let (ctx, east) = cetz.coordinate.resolve(ctx, "labels.east")
let (x, _, _) = east;
draw.translate((x + 1, 0))
draw.group(ctx => {
for i in range(0, lanes.len()) {
let lane = lanes.at(i)
draw.group(ctx => {
draw.anchor("left", (0.0, y_l))
draw.anchor("west", (0.0, y_l))
let prev_state = (level: "", type: "")
for i in range(lane.wave.len()) {
let event = lane.wave.at(i)
Expand All @@ -154,10 +155,10 @@
prev_state.level = resolve_level(prev_state, event)
prev_state.type = event.type
}
draw.anchor("right", (0.0, y_h))
draw.anchor("east", (0.0, y_h))
if grid {
draw.on-layer(-1, {
draw.grid("left", "right", step: (x: 0.5 * w_scale, y: 0.5 * y_scale), stroke: (paint: gray.lighten(60%), thickness: 0.01em))
draw.grid("west", "east", step: (x: 0.5 * w_scale, y: 0.5 * y_scale), stroke: (paint: gray.lighten(60%), thickness: 0.01em))
})
}
})
Expand Down

0 comments on commit 2d56e8b

Please sign in to comment.