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

Multiline math and environment not stripped after first math environment #215

Open
jc1bert opened this issue Dec 10, 2022 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@jc1bert
Copy link

jc1bert commented Dec 10, 2022

Hi,
Thank you for your work on textidote, it works beautifully on many of my tex files.
I'm however hitting a strange behaviour of some files: multiline math environment (and some environment that I'd like to see removed) are not correctly stripped by textidote if they come after a one line math environment.

Consider this MWE:

\begin{document}
One line math:
\[\int_{1}^{2}x \mathrm{d}x}\]

Tikzpicture:
\begin{tikzpicture}
    \draw (0,0);
\end{tikzpicture}

Multi line math:
\[
  \int_{1}^{2}x \mathrm{d}x}
\]

One line math:
\[\int_{1}^{2}x \mathrm{d}x}\]
\end{document}

If I run textidote --clean --remove tikzpicture test.tex, I get the following output:

TeXtidote v0.8.3 - A linter for LaTeX documents and others
(C) 2018-2021 Sylvain Hallé - All rights reserved

One line math:


Tikzpicture:
tikzpicture
    \draw (0,0);
tikzpicture

Multi line math:
\[
  1^2x dx
\]

One line math:

However, if I remove the first math environment, tikzpicture environment and multiline math are correctly removed:

TeXtidote v0.8.3 - A linter for LaTeX documents and others
(C) 2018-2021 Sylvain Hallé - All rights reserved

Tikzpicture:

Multi line math:

One line math:

Am I missing something?

@jc1bert jc1bert changed the title Multiline math and environment not striped after first math environment Multiline math and environment not stripped after first math environment Dec 10, 2022
@sylvainhalle sylvainhalle self-assigned this Dec 12, 2022
@sylvainhalle sylvainhalle added the bug Something isn't working label Dec 12, 2022
@jc1bert jc1bert closed this as completed Mar 10, 2023
@jc1bert jc1bert reopened this Mar 10, 2023
@jc1bert
Copy link
Author

jc1bert commented Mar 10, 2023

Hi,
I just gave v0.9 a try with the MWE provided earlier. The first math environment is still problematic regarding the removal of the tikzpicture environment and the multiline math.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants