Closed maxtremblay closed 7 months ago
Hi @maxtremblay ,
I'm glad you find the package useful :)
This is practically a duplicate of #1 . midstick
is basically implemented as a gate but without a border around the box. The reason is that gates need to overdraw the quantum (or classical) wires (see second screenshot in this issue: #1). However, it would make much sense that the fill
property for quantum-circuit()
would not apply to midstick
, so that midstick
continues using the circuit background color (defaulting to white). This way, midstick
would behave as you suggested.
Edit: see comment below
I will change that. Until the next release, you can work around this issue by declaring
#let gate = gate.with(fill: accent-color)
#let mqgate = mqgate.with(fill: accent-color)
and omitting the fill
argument for quantum-circuit
.
I hope this helps.
Also: in the (rather near) future, (when user-defined types are added to Typst), gate
will become an "element". The fill
parameter will then be deprecated for quantum-circuit
and you can instead write
#set gate(fill: accent-color)
which is much more flexible. Just so you know
Edit: I read up the docs for quill
and actually this:
#let gate = gate.with(fill: accent-color) #let mqgate = mqgate.with(fill: accent-color)
is the intended way to go (until the aforementioned change). The quantum-circuit(fill: )
parameter just changes the default fill for all kinds of gate-like elements so that a circuit can be put on some single-color background that is not white. I have to admit though, this is not very clear from the docs.
Ok. Thank you for the solution. I will go with that for now :smile:
Hello, thanks for this great package.
I have some trouble with midstick and fill color. I have set the option
As you can see, the labels from midstick are filled with a red background which I would prefer to avoid.
I can use lstick instead, but in that case, the kets and dots are not aligned.