From af2d53072c8b8efba997b82351f2101cff3243bf Mon Sep 17 00:00:00 2001 From: Mc-Zen Date: Wed, 23 Oct 2024 21:29:08 +0200 Subject: [PATCH] [improve] behaviour of `wire` parameter of `quantum-circuit` Now, when passing just a thickness or a color, the stroke is complemented with the missing property. --- src/quantum-circuit.typ | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/quantum-circuit.typ b/src/quantum-circuit.typ index d6e8049..226ac99 100644 --- a/src/quantum-circuit.typ +++ b/src/quantum-circuit.typ @@ -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 {