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
Output of latexindent
isn't stable (specialBeginEnd)
#477
Comments
Many thanks, that's a helpful example. Certainly not expected behaviour, and definitely a bug. I'll look into it. |
latexindent
isn't stablelatexindent
isn't stable (specialBeginEnd)
Note to self, maybe try removing the g switch from the find and replace in https://github.com/cmhughes/latexindent.pl/blob/main/LatexIndent/Special.pm |
This didn't work |
Implemented and released at https://github.com/cmhughes/latexindent.pl/releases/tag/V3.23.2 thanks again! |
Thanks a lot for such a quick fix! |
You're welcome, and thank you for such a clear, concise example. Happy
indenting!
…On Mon, 25 Sep 2023, 14:11 Anton Rodomanov, ***@***.***> wrote:
Thanks a lot for such a quick fix!
—
Reply to this email directly, view it on GitHub
<#477 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ7CYFURIGCKRCPYQQAGN3X4F7GLANCNFSM6AAAAAA46MHJWU>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Hi,
I'm trying to make
latexindent
automatically indent the text inside any (round) parentheses (in other words, to treat(
and)
as the beginning and end, respectively, of a certain environment).To achieve this, I've tried to declare a
specialBeginEnd
block (see thelatexindent.yaml
file below).At first, this seemed to work fine and produced the result I wanted. However, I then noticed that the result isn't stable. Specifically, the output changes if you run
latexindent
again (one or several times) without changing anything. In particular, I managed to obtain two different outputs after runninglatexindent
several times on the same file with the same settings and by using the same command (see below).From my limited understanding (after inspecting the log file), it looks as if the problem is that each run of
latexindent
joins the settings fromspecialBeginEnd
in an arbitrary order which results in different internal regular expressions.Please confirm if it's a bug, or if I'm misusing the
specialBeginEnd
feature.Original .tex code (
source.tex
)yaml settings (
latexindent.yaml
)The command used to run
latexindent
Actual output 1 [good] (
source-mod.tex
)Actual output 2 [bad] (
source-mod.tex
)Desired or expected output
The desired output is output 1 [good] presented above.
Version of
latexindent
The text was updated successfully, but these errors were encountered: