diff --git a/src/draw-functions.typ b/src/draw-functions.typ index 510fe0c..e4f0c65 100644 --- a/src/draw-functions.typ +++ b/src/draw-functions.typ @@ -8,14 +8,15 @@ -// create a sized brace with given length. +// Creates a sized brace with given length. // `brace` can be auto, defaulting to "{" if alignment is right -// and "}" if alignment is left. +// and "}" if alignment is left. Other possible values are +// "[", "]", "|", "{", and "}". #let create-brace(brace, alignment, length) = { - let brace-symbol = if brace == auto { - if alignment == right {"{"} else {"}"} - } else { brace } - return $ lr(#brace-symbol#block(height: length)) $ + if brace == auto { + brace = if alignment == right {"{"} else {"}"} + } + return $ lr(#brace, size: length) $ } diff --git a/src/quill.typ b/src/quill.typ index dd836c4..57273fc 100644 --- a/src/quill.typ +++ b/src/quill.typ @@ -71,7 +71,8 @@ panic("Unexpected named argument '" + children.named().keys().at(0) + "' for quantum-circuit()") } set text(color, size: font-size) - + set math.equation(numbering: none) + style(styles => { // Parameter object to pass to draw-function containing current style info diff --git a/tests/decorations/lstick rstick/ref/6.png b/tests/decorations/lstick rstick/ref/6.png new file mode 100644 index 0000000..a603322 Binary files /dev/null and b/tests/decorations/lstick rstick/ref/6.png differ diff --git a/tests/decorations/lstick rstick/test.typ b/tests/decorations/lstick rstick/test.typ index 6fb899f..40733f1 100644 --- a/tests/decorations/lstick rstick/test.typ +++ b/tests/decorations/lstick rstick/test.typ @@ -36,4 +36,12 @@ #quantum-circuit( 1, rstick("very long rstick") -) \ No newline at end of file +) + +#pagebreak() + +// lstick with equation numbering +#set math.equation(numbering: "1") +#quantum-circuit( + lstick($|0〉$, brace: "{"), 1 +)