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

latexindent.pl vs latexindent #364

Closed tdegeus closed 2 years ago

tdegeus commented 2 years ago

Just a question. In Makefile.PL (and on conda) the executable follows the library maintained here to have an executable latexindent.pl. However, on texlive it is latexindent.pl. I think I asked before, but I forget your response : should they be unified? Which naming is the intended?

cmhughes commented 2 years ago

Thanks, Tom, an interesting question :)

I don't have any influence over texlive. My understanding is that they create some kind of sym link that points to latexindent.pl....

I don't know how this would change....? Any ideas?

tdegeus commented 2 years ago

The question is what you find desirable? latexindent or latexindent.pl?

cmhughes commented 2 years ago

I don't have a preference :)

The main priority : something that makes sense to as wide a community as possible. And that can be documented in such a way that it makes sense objectively.

I welcome your views!

On Fri, 13 May 2022, 10:27 Tom de Geus, @.***> wrote:

The question is what you find desirable? latexindent or latexindent.pl?

— Reply to this email directly, view it on GitHub https://github.com/cmhughes/latexindent.pl/issues/364#issuecomment-1125842778, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ7CYG5UI7W5CPD4FKH5VTVJYOADANCNFSM5VYP6OXQ . You are receiving this because you commented.Message ID: @.***>

tdegeus commented 2 years ago

Is latexindent.pl something that can be used as library from perl, or is it strictly command-line? In this latter case I would deprecate latexindent.pl over latexindent at some point

cmhughes commented 2 years ago

What does this mean from a practical point of view...?

tdegeus commented 2 years ago

I guess that I would rename latexindent.pl (the file) to latexindent (the extension is meaningless anyway, the shebang is used), and for a while keep a wrapper latexindent.pl which passes everything to latexindent but prints a deprecation warning, and then after some time simply remove latexindent.

The slight naming inconsistency is not the end of the world though. However, it does seem to confuse people. When I made the conda package I just follow the official library here, but if texlive does things differently it may be better to yield to them

tdegeus commented 2 years ago

Just to clarify: texlive does not strictly rename. It provides this link:

/Library/TeX/texbin/latexindent -> ../../texmf-dist/scripts/latexindent/latexindent.pl

But all around things are not very consistent, because latexdiff does ship a file without the pl extension but texlive provides:

/Library/TeX/texbin/latexdiff -> ../../texmf-dist/scripts/latexdiff/latexdiff.pl

So honestly I don't know what to do best ;)

cmhughes commented 2 years ago

It's good to think about this.

I've been thinking about this over the past few days. I guess my summary is: unless this needs to be changed, I'd prefer not to change it: if it isn't broken, I'd prefer not to fix it.

Pretty much since the beginning of the project, it has been called latexindent.pl. Having the extension .pl helps the user to understand that it is a perl script.

If there's a mission-critical reason to change it, I'll consider it, but otherwise I propose that it is left as is. Happy to continue the discussion if helpful.

tdegeus commented 2 years ago

Let's keep things as they are now! It's completely fine to have the pl extension, I've seen it elsewhere. I just wanted to make sure there was no unintended confusion created.