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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
85 views

latexindent add tblr (tabularray) environment as tabular for aligning at &

I wanted to know if there is a way to let latexindent know that tblr is a tabular environment by the package tabularray which means that the content should be aligned at &. I could only manage to ...
user avatar
1 vote
1 answer
293 views

LaTeXindent fail in VSCode: Can't locate Log/Log4perl.pm

I'm using LaTeX Workshop on VSCode to build pdf using LaTeX and I'm getting this error in the Output console when I save the .tex file. Formatting with command latexindent -c,d:path_to_folder,d:...
user avatar
2 votes
1 answer
961 views

I am missing latexindent after texlive installation

On Ubuntu 20.04 I installed texlive from the terminal using $ sudo apt install texlive $ sudo apt install texlive-latex-recommended I can compile a minimal example from the terminal without error, ...
user avatar
  • 123
3 votes
1 answer
77 views

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-...
user avatar
  • 488
4 votes
1 answer
428 views

__latexindent_temp.tex VSCode Error

The Latex Workshop VSCode Extension has been generating a file called __latexindent_temp.ex every build. Contrary to this message, I have ensured that MiKTeX is fully updated. I have tried ...
user avatar
  • 61
2 votes
1 answer
131 views

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}{ ...
user avatar
  • 768
3 votes
1 answer
840 views

How to use latexindent on Windows?

I want to use latexindent on my file. When I run the code latexindent.exe myfile.tex I get the following error. Can't locate LatexIndent/Document.pm in @INC (you may need to install the LatexIndent::...
user avatar
  • 53
4 votes
1 answer
191 views

How to make latexindent align columns in nested environments?

The following MWE is the result of running latexindent with default settings: \documentclass[border=1in, preview]{standalone} \usepackage{amsmath} \usepackage{mathtools} \usepackage{nicematrix} \...
user avatar
  • 197
1 vote
0 answers
386 views

Can't get latexindent to work: "Could not open defaultSettings.yaml" [closed]

So. I would like to use latexindent. I use the 2.9 version of MiKTeX and I installed latexindent via the MiKTeX console. Every time I try to use latexindent (even from console) I get: Could not open ...
user avatar
  • 11
1 vote
0 answers
54 views

latex indent 3.8.2 modifyLineBreaks & verbatim environments [closed]

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 ...
user avatar
  • 123
3 votes
1 answer
183 views

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 ...
user avatar
  • 488
0 votes
0 answers
191 views

Latexindent doesn't work without sudo

When i run latexindent -v I get: segmentation fault latexindent -v With sudo latexindent -v: 3.8, 2020-03-21 I installed latex indent with sudo tlmgr install latexindent because without it I would ...
user avatar
  • 1
2 votes
1 answer
671 views

Adding entry .bib file breaks LaTeX Workshop in VS Code

When I add an entry to my .bib file and save it, I get an error on compilation that reads: Formatting failed. Please refer to LaTeX Workshop Output for details. Chasing the hint, I see in the ...
user avatar
3 votes
0 answers
268 views

latexindent and trailing comments

In macros it makes sense to put percent signs at the end of line in order to avoid any line break characters in the macro definition. For example, a macro with a multi-line definition could look like ...
user avatar
1 vote
1 answer
210 views

How to remove redundant spaces in the .tex file using latexindent?

Example: \begin{align} a + b = c \end{align} [more spaces here] <= I am using the latexindent to format my tex file. However, each time I format the file, it will create more space after some ...
user avatar
  • 141
2 votes
1 answer
267 views

Automatic indentation done for subfiles with arara and latexindent not working

I am learning with latexindent. I would like to follow up this question: How is automatic indentation done for subfiles with arara and latexindent? and ask for clarification: Is there required any ...
user avatar
1 vote
1 answer
246 views

Latexindent with Homebrew Perl and Sublime Text

I'm trying to get the package BeautifyLatex working on Sublime Text 3. My initial attempts revealed that certain Perl modules were missing which prevented latexindent from working. Instead of fiddling ...
user avatar
  • 133
1 vote
1 answer
857 views

latexindent texlive and texstudio

I am using TeXStudio with texlive on Windows 10 computer. I would like TeXStudio to automatically handle my indentation in my tex-files. My question is: How to install latexindent in texstudio when ...
user avatar
  • 1,026
28 votes
4 answers
15k views

latexindent: Can't locate Log/Log4perl.pm in @INC (you may need to install the Log::Log4perl module)

I have Strawberry Perl and MiKTeX v2.9 installed on Windows 10 with the latexindent package installed via the MiKTeX console. However, running latexindent.pl in the command prompt results in the ...
user avatar
  • 8,759
6 votes
1 answer
4k views

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 ...
user avatar
3 votes
0 answers
335 views

latexindent with arara produces error message [closed]

I try to get my files indented automatically with arara, latexindent and texmaker. I have the TexLive Distribution, so both programs should be installed correctly (or am I wrong?). At least when I ...
user avatar
  • 977
13 votes
5 answers
9k views

How can I install latexindent on macOS?

I'm using the basicTeX distribution, rather than the MacTeX distribution. I prefer it this way, but there is one problem. I does not come with the tool latexindent which MacTeX does. I can't figure ...
user avatar
  • 514
6 votes
1 answer
3k views

How to use latexindent in TeXStudio on Windows?

I am using TeXStudio with MiKTeX on my Windows 10 computer. I would like TeXStudio to automatically handle the code's indentation in my tex-files, so I enabled Indentation mode under the Editor ...
user avatar
  • 4,231
3 votes
1 answer
2k views

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 ...
user avatar
2 votes
2 answers
2k views

Use latexindent.pl with `BeautifyLatex` in sublime text

I was trying to use latexindent.pl with the package BeautifyLatex in SublimeText 3 on OS X El Capitan . When I tried to save tex file, there was an error: Error: can't specify None for path argument ...
user avatar
  • 204
4 votes
1 answer
364 views

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 ...
user avatar
  • 15.1k
3 votes
1 answer
959 views

Arara with latexindent

I've been trying to install arara and latexindent to get automatic indentation in TeXstudio. I've managed to install arara, and latexindent seems to be working fine. But I can't figure out how to run ...
user avatar
  • 263
4 votes
1 answer
2k views

How to configure TexLive 2015 to use latexindent.pl script with Kile

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 ...
user avatar
  • 509
4 votes
1 answer
471 views

Workaround for latexindent bug [closed]

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: ...
user avatar
  • 15.1k
4 votes
1 answer
640 views

arara with indent.yaml works in command line but not in TeXmaker

I am running Windows 7 and a recent (Dec 2014) distribution of TeX Live and a recent version of TeXmaker. When invoking arara myFile.tex in the command line it returns "indent SUCCESS" and when ...
user avatar
  • 41
6 votes
2 answers
2k views

How to Use Arara in TexStudio

I'm trying to use latexindent to clean up my code in TexStudio and I can't get it to work. I've installed latexindent and arara in Tex Live Utility I've added a User Command to TexStudio of: /usr/...
user avatar
  • 103
1 vote
0 answers
2k views

Arara and latexindent with texmaker [closed]

I am new to latex and I try to auto indent my latex file using arara and latex indent. I use texmaker as IDE. I installed arara exactly as: How to install arara with MiKTeX / Windows? and tested it. ...
user avatar
  • 11
2 votes
1 answer
533 views

Using latexindent from vi?

I would like to use latexindent from the vi editor. Ideally, I would use it just like one uses fmt. Recall that in vi you can filter any portion of your text through an external filter. So, one could ...
user avatar
  • 15.1k
8 votes
1 answer
839 views

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 ...
user avatar
  • 17.2k
1 vote
1 answer
754 views

Output latexindent auxiliary files to a different directory

I just started using Notepad++ and SumatraPDF for my LaTeX stuff. When compiling a .tex file using pdflatex, one can specify an option -output-directory=<folder> to save all the auxiliary ...
user avatar
  • 17.2k
10 votes
1 answer
1k views

How is automatic indentation done for subfiles with arara and latexindent?

I guess that I have overlooked something, but I can't find a solution to run arara on my subfiles when processing my main file. I would like to autoindent my code but only succeed for the main.tex. I ...
user avatar
  • 42.1k