Skip to content

Publish to Typst Universe #1

@JuanM04

Description

@JuanM04

Sorry for opening an issue for this, but I've been using this package and I think it's worth publishing it, at least as version 0.0.1. Both texttiming and timingtable still need some improvement, but the wave function works quite nice! It's very simple to use and generates beautiful results.

The only thing I would add is allowing transition-width as a parameter.

Example of the timings of a SR FF

Image

#cetz.canvas(
  length: 1em,
  {
    import cetz.draw: *

    let T(x, label) = {
      line(
        (x, 1),
        (rel: (0, -16)),
        stroke: (paint: colors.tx-2, thickness: 2pt, dash: (12pt,)),
      )
      content((x, -16), text(24pt, label))
    }

    T(2, $T_1$)
    T(4, $T_2$)
    T(8, $T_3$)
    T(14, $T_4$)
    T(18, $T_5$)

    let segment(
      label,
      y: 0,
      sequence,
    ) = {
      content(
        (-3, y + 1),
        (rel: (2, -2)),
        align(horizon + center, text(40pt, label)),
      )
      wave(amplitude: 2.0, stroke: 3pt + colors.tx, origin: (x: 0, y: y), sequence)
    }

    segment(y: 0, $S$, "LHLLLLLHHLL")
    segment(y: -4, $R$, "LLLLHLLHHLL")
    segment(y: -8, $Q$, "UHHHLLLLLMM")
    segment(y: -12, $overline(Q)$, "ULLLHHHLLMM")
  },
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions