For anyone trying to install Latexindent.pl on a clean Mojave installation (macOS 10.14.1, November 2018) so that it works with Atom and other IDEs, there are some more steps required.
First, because some of the perl helper modules require compilation, you'll need a working installation of C and perl:
Make sure that you have Xcode installed and working, including command line tools.
sudo xcode-select --switch /Library/Developer/CommandLineTools
Make the header files for c etc. available; see the comment from @Maxx here (https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave):
I quote:
If we are using XCode 10, you will notice that if you navigate to /usr in the Finder, you will not see a folder called 'include' anymore which is why the terminal complains of the absence of the header files which is contained inside the 'include' folder. In this release statement, developer.apple.com/documentation/xcode_release_notes/… (you navigate to /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg and run that package to have the 'include' folder installed). Then you should be good to go.
- Install cpan through the terminal to help with perl installations:
cpan App::cpanminus
The next step is to get Latexindent working as a standalone tool:
- Install it using tlmgr as described elsewhere on this page
- Download the entire
Latexindent zip from https://github.com/cmhughes/latexindent.pl.
- Open a terminal window
- In the terminal navigate to the "helper-scripts" directory
- Run
sudo perl latexindent-module-installer.pl to get all of the other required perl modules installed.
You can now test latexindent.pl by opening a new terminal and navigating to the directory where your .tex file is (let`s call it test.tex). Once there, you can test it without changing your file:
latexindent.pl test.tex
From this point on there are many more useful examples in the documentation on readthedocs or the CTAN Package PDF.
This means that latexindent.pl now works with atom-beautify.
tlmgr, which Tex Live Utility is just a GUI for. Butlatexindentis not available from there as far as I can see. – eivindml Sep 08 '17 at 14:14latexindent.tar.lzmafrom a MiKTeX repository and unzip it in yourtexmf-local? – Bernard Sep 08 '17 at 14:19