Perl script to add indentation (leading horizontal space) to LaTeX files. It can modify line breaks before, during and after code blocks; it can perform text wrapping and paragraph line break removal. It can also perform string-based and regex-based substitutions/replacements. The script is customisable through its YAML interface.
GPL-3.0 License
Bot releases are visible (Hide)
Published by github-actions[bot] almost 2 years ago
Minor bugfix for indentconfig.yaml
, https://github.com/cmhughes/latexindent.pl/commit/8e3ec0917d7435bf8bcceaf3f14c91b2bcdee3ea
Published by github-actions[bot] almost 2 years ago
when: before/after
, full details at issue-359
comments: wrap: 0/1
, full details at issue-389
indentconfig.yaml
and friends, full details at issue-396, thanks to @NehctarglookForAlignDelims: 1
, full details at issue-402
Published by github-actions[bot] almost 2 years ago
Standalone executables/binaries avaialble for Ubuntu Linux and MacOS (to accompany latexindent.exe
), all available from the releases page:
latexindent.exe
latexindent-linux
latexindent-macos
All 3 files contain defaultSettings.yaml
, so should standalone. See https://github.com/cmhughes/latexindent.pl/issues/388 for more details.
Published by github-actions[bot] over 2 years ago
oneSentencePerLine
with text wrapping now respects removeSentenceLineBreaks
, issue-355
textWrapOptions
can be customised further with removeBlockLineBreaks
indentAfterItems
defaults updated to include enumerate*
, itemize*
, description*
, issue-356
pre-commit
defaults updated, see pull 354, thank you to @HolzhausPublished by github-actions[bot] over 2 years ago
-wd
switch which means 'overwrite if different'; similar to the -w
switch, but will only activatemultipleSpacesToSingle
feature for oneSentencePerLine
--GCString
switch available to optionally load the Unicode::GCString
module, issue 303
Published by github-actions[bot] over 2 years ago
This release implements a complete overhaul of the textWrap
routine. The interface is now
textWrapOptions:
columns: 0
multipleSpacesToSingle: 1
blocksFollow:
headings: 1
commentOnPreviousLine: 1
par: 1
blankLine: 1
verbatim: 1
filecontents: 1
other: '\\\]|\\item(?:\h|\[)' # regex
blocksBeginWith:
A-Z: 1
a-z: 1
0-9: 0
other: 0 # regex
blocksEndBefore:
commentOnOwnLine: 1
verbatim: 1
filecontents: 1
other: '\\begin\{|\\\[|\\end\{' # regex
huge: overflow # forbid mid-word line breaks
separator: ""
Full details are documented at https://latexindentpl.readthedocs.io/en/latest/sec-the-m-switch.html#text-wrapping and some details within https://github.com/cmhughes/latexindent.pl/issues/346
tabulararray
is now supported by default, https://github.com/cmhughes/latexindent.pl/issues/343
Published by github-actions[bot] over 2 years ago
new feature: pre-commit
now supported with latexindent.pl
!
A massive thank you to @tdegeus for contributing this feature.
The feature is documented fully at https://latexindentpl.readthedocs.io/en/latest/sec-appendices.html#pre-commit; for reference see also https://github.com/cmhughes/latexindent.pl/pull/322 and https://github.com/cmhughes/latexindent.pl/issues/316
In brief, variations of the file .pre-commit-config.yaml
in your .git
repository as follows
- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.15
hooks:
- id: latexindent
args: [-s]
and then running
pre-commit run --all-files
will run latexindent.pl
on all .tex
files in your repository. There's a supported option for conda
users also. Full details at https://latexindentpl.readthedocs.io/en/latest/sec-appendices.html#pre-commit
Published by github-actions[bot] almost 3 years ago
-vv
switch for verbose versionPublished by github-actions[bot] almost 3 years ago
Documentation updated to include: https://github.com/cmhughes/latexindent.pl/pull/310 and https://github.com/cmhughes/latexindent.pl/pull/311
Published by github-actions[bot] almost 3 years ago
defaultSettings.yaml
can (optionally) now be located in LatexIndent/
folder.
This was proposed in https://github.com/conda-forge/staged-recipes/pull/16914
Published by github-actions[bot] almost 3 years ago
Upgrade to -y
switch https://github.com/cmhughes/latexindent.pl/issues/296, and minor updates to documentation https://github.com/cmhughes/latexindent.pl/issues/299 and https://github.com/cmhughes/latexindent.pl/issues/300
Thank you to @XuehaiPan for their contribution.