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
864 stars 84 forks source link

can't run it, neither after `tlmgr` nor as a Perl script #536

Closed yegor256 closed 4 months ago

yegor256 commented 4 months ago

I just did this:

$ sudo tlmgr install latexindent
tlmgr: package repository https://ctan.mirrors.hoobly.com/systems/texlive/tlnet (verified)
tlmgr install: package already present: latexindent
$ latexindent
-bash: latexindent: command not found
$ latexindent.pl
-bash: latexindent.pl: command not found

I tried to run it directly:

$ /opt/homebrew/Cellar/texlive/20240312/share/texmf-dist/scripts/latexindent/latexindent.pl foo.tex
Can't locate YAML/Tiny.pm in @INC (you may need to install the YAML::Tiny module) (@INC entries checked: /opt/homebrew/Cellar/texlive/20240312/share/texmf-dist/scripts/latexindent /opt/homebrew/opt/perl/lib/perl5/site_perl/5.38/darwin-thread-multi-2level /opt/homebrew/opt/perl/lib/perl5/site_perl/5.38 /opt/homebrew/opt/perl/lib/perl5/5.38/darwin-thread-multi-2level /opt/homebrew/opt/perl/lib/perl5/5.38 /opt/homebrew/lib/perl5/site_perl/5.38) at /opt/homebrew/Cellar/texlive/20240312/share/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm line 22.

What am I doing wrong?

cmhughes commented 4 months ago

Perhaps try

sudo cpan -i App::cpanminus sudo cpanm YAML::Tiny sudo cpanm File::HomeDir

On Sat, 20 Apr 2024, 11:46 Yegor Bugayenko, @.***> wrote:

I just did this:

$ sudo tlmgr install latexindent tlmgr: package repository https://ctan.mirrors.hoobly.com/systems/texlive/tlnet (verified) tlmgr install: package already present: latexindent $ latexindent -bash: latexindent: command not found

I tried to run it directly:

$ /opt/homebrew/Cellar/texlive/20240312/share/texmf-dist/scripts/latexindent/latexindent.pl foo.tex Can't locate YAML/Tiny.pm in @INC (you may need to install the YAML::Tiny module) @.*** entries checked: /opt/homebrew/Cellar/texlive/20240312/share/texmf-dist/scripts/latexindent /opt/homebrew/opt/perl/lib/perl5/site_perl/5.38/darwin-thread-multi-2level /opt/homebrew/opt/perl/lib/perl5/site_perl/5.38 /opt/homebrew/opt/perl/lib/perl5/5.38/darwin-thread-multi-2level /opt/homebrew/opt/perl/lib/perl5/5.38 /opt/homebrew/lib/perl5/site_perl/5.38) at /opt/homebrew/Cellar/texlive/20240312/share/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm line 22.

What am I doing wrong?

— Reply to this email directly, view it on GitHub https://github.com/cmhughes/latexindent.pl/issues/536, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ7CYGLZKY5MDS667VK75TY6JBPZAVCNFSM6AAAAABGQMSTQCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TINBZGY4TGMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cmhughes commented 4 months ago

https://latexindentpl.readthedocs.io/en/latest/sec-appendices.html#linux

yegor256 commented 4 months ago

@cmhughes I ended up with this:

brew install latexindent

Thanks for your tool!

cmhughes commented 4 months ago

Great glad it works