Closed musm closed 2 years ago
Yes, absolutely!
Try the following
replacements:
-
substitution: s/([a-zA-Z0-9.}{])\h{2,}([a-zA-Z0-9.}{])/$1 $2/sg
when: before
-
substitution: s/([a-zA-Z0-9.()}{])\h{2,}([a-zA-Z0-9.()}{]|(?:\\(?!\\)))/$1 $2/sg
when: after
You'll need to use one of the replacement switches, for example
latexindent.pl - rv myfile.tex
Thank you @cmhughes, my regex attempts to get this to work weren't successful.
I frequently type in extraneous additional whitespaces. I wonder if something like this shouldn't just be an option, but perhaps more effort than it's worth?
The substitution for the before
case makes sense. What is the substitution handling for the after
case?
The second one can be helpful if text wrapping is active.
On Sat, 5 Feb 2022, 05:25 Mustafa M, @.***> wrote:
The substitution for the before case makes sense. What is the substitution handling for the after case?
— Reply to this email directly, view it on GitHub https://github.com/cmhughes/latexindent.pl/issues/336#issuecomment-1030530631, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ7CYFROGKLX67MFWMA463UZSYDLANCNFSM5NSZFWRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Is there a simple yaml setting I could turn on to compress spaces between words, such that
to