1

Since there is no --recursive option, I wonder how to recursively format all entries in \input{} present in the main .tex file.

1 Answers1

1

Due to lack of apparent solution for this this issue, the following shell command forces latexindent to run for every \input{} entry found in the main .tex file:

grep -oP "(?<=\\\\input{)[^}]+" main.tex | while read file; do
    latexindent --silent --overwrite ${file}
done

where main.tex is the main latex file with your \input{} entries. That is a ad-hoc solution, though. I would like to have a more elegant way out.