Questions tagged [latexindent]

latexindent is a Perl script that aims to beautify .tex files. It is customizable through its YAML-based interfaced, described in the documentation. It is also available as a .exe file

The project is hosted at https://github.com/cmhughes/latexindent.pl/ which is the appropriate place for bug reports.

Please see https://github.com/cmhughes/latexindent.pl/ for installation instructions, and for links to the documentation which is available in both pdf and html format.

45 questions
8
votes
1 answer

Indent LaTeX code NOT in an environment using latexindent

I really like how latexindent does a good job indenting most parts of my code in a document. However, there are a few instances where latexindent doesn't do what I want it to do. These instances generally involve codes that I'd like to be indented,…
Herr K.
  • 17,946
  • 4
  • 61
  • 118
7
votes
1 answer

Missing latexindent from TeXLive full installation

Even after sudo apt-get install texlive-full on Linux I'm apparently missing latexindent. I can't configure any command with this application within TeXstudio because I get the following, as an example: Error: Could not start the command:…
4
votes
1 answer

latexindent: strange tabbing with nested braces

I have the following code snippet, and meant to be formatted as such: \setmainfont[ UprightFeatures={ SizeFeatures={ {Size={-8.4},Font=MinionPro-Capt}, {Size={8.4-13},Font=MinionPro-Regular}, …
SRSR333
  • 568
4
votes
1 answer

latexindent.pl: indent brace blocks similar to C-style languages

Suppose I have the following code listing: font/lm/.code={ \RequirePackage{fix-cm} \RequirePackage[rm={lining=true}]{cfr-lm} \RequirePackage{amsfonts, amssymb} % Define tabular-lining figures and oldstyle…
SRSR333
  • 568
4
votes
1 answer

Using latexindent on Windows

I discovered latexindent and want to use it on my Windows machine. I am using MiKTeX and Strawberry Perl. MiKTeX has a package manager which lists latexindent. For some reason I cannot install or deinstall it although I am starting the MiKTeX…
4
votes
1 answer

latexindent: it does the work, but emits these messages

Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*\\begin{ <-- HERE document}/ at /opt/texbin/latexindent line 677. Unescaped left brace in regex is deprecated, passed through in regex; marked by <--…
Yossi Gil
  • 15,951
4
votes
1 answer

Workaround for latexindent bug

Running latexindent I get the following error message: YAML::Tiny found a duplicate key 'pmatrix' in line '1' at /usr/local/texlive/2014/bin/x86_64-linux/latexindent line 171. The bug resists: Reinstallation (working on Ubuntu 14.10) Removal of…
Yossi Gil
  • 15,951
2
votes
1 answer

Why does latexindent fail to properly indent this code?

Latexindent fails to properly indent this code (it removes all indentation, when it should rather leave the indentation alone, or minimally modify it at least). \ExplSyntaxOn \newcommand*{\fixcref}{ % Allow spaces in `cref` command. …
Noldorin
  • 890
1
vote
1 answer

Need Help with LaTeXIndent YAML Configuration to Avoid Unwanted Line Wraps

I'm currently using the following YAML configuration for latexindent: verbatimEnvironments: verbatim: 1 lstlisting: 1 minted: 1 codebox: 1 modifyLineBreaks: textWrapOptions: columns: 80 However, I've encountered an issue where the…
1
vote
1 answer

unexpected indentation behaviour with latexindent

I have the following file that is part of one of my custom classes: % actual latexindent output: \DeclareDocumentCommand {\chapterformat} { } { \thechapter } \DeclareDocumentCommand {\sectionformat} { } {\thesection} \DeclareDocumentCommand…
marc
  • 701
1
vote
1 answer

How to make latexindent format recursively all files put within \input{}?

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

latex indent 3.8.2 modifyLineBreaks & verbatim environments

My eventual goal is to use latexindent to justify paragraph text but not touch any material beginning with a \begin{align} and ending with an \end{align}. I'm not able to figure out how to do both simultaneously. For example text use Occaecat magna…
lsfinn
  • 123