Skip to content

Commit

Permalink
[improve] behaviour of wire parameter of quantum-circuit
Browse files Browse the repository at this point in the history
Now, when passing just a thickness or a color, the stroke is complemented with the missing property.
  • Loading branch information
Mc-Zen committed Oct 23, 2024
1 parent cebb825 commit af2d530
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/quantum-circuit.typ
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@
if children.named().len() > 0 {
panic("Unexpected named argument '" + children.named().keys().at(0) + "' for quantum-circuit()")
}
set text(color, size: font-size)
if type(wire) == color { wire += .7pt }
if type(wire) == length { wire += black }

set text(wire.paint, size: font-size)
set math.equation(numbering: none)

context {
Expand Down

0 comments on commit af2d530

Please sign in to comment.