Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZX environment is fragile on blank lines #4

Closed
dlyongemallo opened this issue Nov 5, 2023 · 3 comments
Closed

ZX environment is fragile on blank lines #4

dlyongemallo opened this issue Nov 5, 2023 · 3 comments

Comments

@dlyongemallo
Copy link
Contributor

If there are any blank lines, it breaks compilation.

For example, this is fine:

\begin{ZX}
\zxZ{\alpha} \arrow[r] & \zxFracX-{\pi}{4}
\end{ZX}

But this is not:

\begin{ZX}

\zxZ{\alpha} \arrow[r] & \zxFracX-{\pi}{4}

\end{ZX}

The above results in Missing $ inserted and causes an emergency stop.

@tobiasBora
Copy link
Contributor

tobiasBora commented Nov 6, 2023

Thanks. So the problem seems to boil down to tikzcd, so if you want you can report this there. Meanwhile, I disabled explicitly newlines in \begin{ZX} in order to get a clearer error message. This is fixed in bf59bfd

I’m also curious, are you fine with having a clearer error message, or would you really want to be able to do the above syntax? If so, what is your use-case?

@dlyongemallo
Copy link
Contributor Author

I'm fine with a clearer error message. My use case is that I'm using zx-calculus within the latex environment in Anki cards, and for reasons I can't pin down, it sometimes injects additional newlines into the code that it actually sends to the latex compiler. I've worked around this by replacing the newlines with spaces.

Where should tikzcd issues be reported?

@tobiasBora
Copy link
Contributor

Oh that's a funny application. You can report issues on their github page here https://github.com/astoff/tikz-cd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants