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

Generating tmp.tex from [$$] block adds blank lines, breaking some environments #3466

Open
dae opened this issue Oct 2, 2024 · 1 comment

Comments

@dae
Copy link
Member

dae commented Oct 2, 2024

A card with the following text:
[$$]
\begin{tikzcd}
PB \ar[r, "g^{-1}"] \ar[d, "k_"']
& PD \ar[d, "h_
"] \
PC \ar[r, "f^{-1}"']
& PA
\end{tikzcd}
[/$$]

generates the following tmp.tex file:
[... preamble, including the needed \usepackage etc commands, snipped ...]
\begin{displaymath}
\begin{tikzcd}
PB \ar[r, "g^{-1}"] \ar[d, "k_*"']

& PD \ar[d, "h_*"] \

PC \ar[r, "f^{-1}"']

& PA
\end{tikzcd}

\end{displaymath}
\end{document}

which fails to compile, because of the blank lines. I don’t know why Anki is introducing these blank lines, and I don’t know how to stop it doing so.
Anki version:
Anki 24.06.3 (d678e39)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-14.7-arm64-arm-64bit

Originally reported on https://forums.ankiweb.net/t/generating-tmp-tex-from-block-adds-blank-lines-breaking-some-environments/50169/2

@juliangilbey
Copy link

(And that forum post also has an analysis of the cause of the problem and a suggested resolution.)

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