cmhughes / latexindent.pl

Perl script to add indentation (leading horizontal space) to LaTeX files. It can modify line breaks before, during and after code blocks; it can perform text wrapping and paragraph line break removal. It can also perform string-based and regex-based substitutions/replacements. The script is customisable through its YAML interface.
GNU General Public License v3.0
884 stars 84 forks source link

Request support / Feature request for `tabularray` tabulars #343

Closed MartinRJDagleish closed 2 years ago

MartinRJDagleish commented 2 years ago

Hey,

I am loving latexindent as a convenient way to indent my documents and to have better readable source code.

The only problem I have encountered is that latexindent does not seem to work with the tblr environment by the package tabularray. It is basically like the tabular environment and I would like the alignments to be made at the & signs.

Related question (which was implemented for nicematrix package): https://tex.stackexchange.com/questions/568637/how-to-make-latexindent-align-columns-in-nested-environments

My question on TeX.SX: https://tex.stackexchange.com/questions/634997/latexindent-add-tblr-tabularray-environment-as-tabular-for-aligning-at

cmhughes commented 2 years ago

Glad it's working for you.

Can you try

lookForAlignDelims:
   tblr: 1
cmhughes commented 2 years ago

Let me know if you need anything further on this.

lvjr commented 2 years ago

I am the author of tabularray package. Could you please add environments tblr, longtblr, talltblr to defaultSettings.yaml so that my users need not to manually change settings?

cmhughes commented 2 years ago

Many thanks, will do :)

On Mon, 28 Feb 2022, 22:59 lvjr, @.***> wrote:

I am the author of tabularray package. Could you please add environments tblr, longtblr, talltblr to defaultSettings.yaml so that my users need not to manually change settings?

— Reply to this email directly, view it on GitHub https://github.com/cmhughes/latexindent.pl/issues/343#issuecomment-1054774785, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ7CYBNCF3756COPWYMUPLU5VFW7ANCNFSM5PIAZ5XA . 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 modified the open/close state.Message ID: @.***>

cmhughes commented 2 years ago

Implemented as of https://github.com/cmhughes/latexindent.pl/commit/6d55394a65126d0c77c105ac92a5126777dd7c03

This will be part of the next release, coming soon. Please leave this open, and I'll close it when appropriate.

cmhughes commented 2 years ago

Implemented as of https://github.com/cmhughes/latexindent.pl/releases/tag/V3.16