Quantomatic / zxlive

A graphical tool for the ZX calculus
Apache License 2.0
44 stars 14 forks source link

Tikz diagram export for proofs sometimes does not align the equal sign properly #198

Open RazinShaikh opened 6 months ago

jvdwetering commented 6 months ago

I think this happened in the demo, because you made your diagram offset from the origin in ZXLive. Given that the origin is not exactly visible in ZXLive, I'm not sure what the right solution is. Perhaps we can just automatically calculate a center of the diagram?

RazinShaikh commented 6 months ago

Ah I didn't realize it was based on the origin. We could make the origin more visible but calculating the center of the diagram would probably give more consistent behavior.

jvdwetering commented 5 months ago

A drawback of basing it on the centre of the diagram is that when you do rewriting the center might change, and it might make the diagram skip around in unpredictable ways. I think having a clear origin that is used for the tikz export might be the way to go.