I would like to autoindent my code under Kile using latexindent
.
I have TeXLive 2015 installed and I run arara
on my tex file.
I tried to follow the manual instructions (p.5) for latexindent where it is said to copy indent.yaml
to the directory of arara
rules or to add the directory in which latexindent.pl
resides to my araraconfig.yaml file. This last one doesn't exist in my TeXLive distribution nor the indent.yaml
file, so I copied ident.yaml
to arara
rules directory but I get this error message:
I'm sorry, but the command from the 'Indent' task could not be found.
Are you sure the command 'latexindent.pl -s -t -w "filename.tex" is
correct, or even accessible from the system path?
Where is the problem?
Best Answer
I'm finally able to run indentlatex correctly and here is how I solved the problem
First one have to create a configuration file for arara:
araraconfig.yaml
. This file should be placed in your home directory/home/<yourusername>
and should indicate the path oflatexindent.pl
file in your system. Myararaconfig.yaml
on my Linux machine looks like this:(The
latexindent
script comes with the 2015 TeX Live distribution).Then one should copy
indent.yaml
in thearara
rules directory (to be downloaded from here). At this stage it is still not possible to runlatexindent
, some modules must be installed (see documentation p. 17). For this, from the command line run:If not installed, Linux will ask you to install it. Then from the CPAN prompt you could install missing moudules:
Once installation is finished, you can run
latexindent
from the command line:and to make it possible to run with arara, one last thing is needed, you should remove the .pl from the
indent.yaml
file. Here is the line that should be modified