zxlive icon indicating copy to clipboard operation
zxlive copied to clipboard

When pasting tikz, have ability to ignore certain errors

Open jvdwetering opened this issue 6 months ago • 0 comments

Currently when you try to import some tikz into zxlive and you get an error like "invalid phase label" there is no way to continue. I propose adding an option like "Try again while ignoring this type of error". This would require a change in pyzx where pyzx.tikz.tikz_to_graph gives more options for ignoring specific types of errors. I propose the following error categories:

  • Ignoring nodes/edges with an invalid definition
  • Ignoring nodes with an invalid style
  • When encountering vertices with the same position, give the option to merge these together, or to leave them separate
  • When an invalid phase definition is encountered, just put the default phase on that node (0 for most nodes, 1 for H-boxes)

jvdwetering avatar Aug 20 '24 18:08 jvdwetering