All Projects → cmhughes → Latexindent.pl

cmhughes / Latexindent.pl

Licence: gpl-3.0
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.

Programming Languages

perl
6916 projects

Projects that are alternatives of or similar to Latexindent.pl

Mbeautifier
MBeautifier is a MATLAB source code formatter, beautifier. It can be used directly in the MATLAB Editor and it is configurable.
Stars: ✭ 248 (-40.24%)
Mutual labels:  beautify, beautifier, formatter
Unibeautify
One Beautifier to rule them all, One Beautifier to clean them, One Beautifier to bring them all and in the darkness sheen them
Stars: ✭ 466 (+12.29%)
Mutual labels:  beautify, beautifier, formatter
Atom Beautify
📣 Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | 💄 Universal beautification package for Atom editor (⚠️ Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding ❤️ )
Stars: ✭ 1,501 (+261.69%)
Mutual labels:  beautify, beautifier, formatter
Pp sql
Rails ActiveRecord SQL queries log beautifier
Stars: ✭ 223 (-46.27%)
Mutual labels:  beautify, beautifier, formatter
Uncrustify
Code beautifier
Stars: ✭ 2,442 (+488.43%)
Mutual labels:  beautify, beautifier, formatter
Swaggen
OpenAPI/Swagger 3.0 Parser and Swift code generator
Stars: ✭ 385 (-7.23%)
Mutual labels:  yaml, formatter
Vim Autoformat
Provide easy code formatting in Vim by integrating existing code formatters.
Stars: ✭ 2,000 (+381.93%)
Mutual labels:  beautify, formatter
vscode-liquid
💧Liquid language support for VS Code
Stars: ✭ 137 (-66.99%)
Mutual labels:  formatter, beautifier
Git-Beautify-For-MacOS-Terminal
An easy-to-use set of config files to beautify Git in your MacOS or OS X terminal. If you find it hard to parse a jumble of mono-colored type on your command line, this set-up can help you tame the ugly bash beast.
Stars: ✭ 127 (-69.4%)
Mutual labels:  beautify, beautifier
Sublime-Pretty-Shell
🐚 Shell Script Formatter / Syntax Checker (Powered by shfmt)
Stars: ✭ 28 (-93.25%)
Mutual labels:  formatter, beautify
yamlfmt
A simple opionated yaml formatter that keeps your comments!
Stars: ✭ 27 (-93.49%)
Mutual labels:  yaml, formatter
Go Mod Outdated
Find outdated dependencies of your Go projects. go-mod-outdated provides a table view of the go list -u -m -json all command which lists all dependencies of a Go project and their available minor and patch updates. It also provides a way to filter indirect dependencies and dependencies without updates.
Stars: ✭ 474 (+14.22%)
Mutual labels:  beautify, beautifier
bafi
Universal JSON, BSON, YAML, CSV, XML converter with templates
Stars: ✭ 65 (-84.34%)
Mutual labels:  yaml, formatter
atom-perfectionist
Beautify CSS and SCSS
Stars: ✭ 19 (-95.42%)
Mutual labels:  formatter, beautify
Sh
A shell parser, formatter, and interpreter with bash support; includes shfmt
Stars: ✭ 4,343 (+946.51%)
Mutual labels:  beautify, formatter
stylus-supremacy
A Node.js script that helps formatting Stylus files.
Stars: ✭ 86 (-79.28%)
Mutual labels:  formatter, beautifier
Powershell Beautifier
A whitespace reformatter and code cleaner for Windows PowerShell and PowerShell Core
Stars: ✭ 213 (-48.67%)
Mutual labels:  beautifier, formatter
Nginx Config Formatter
nginx config file formatter/beautifier written in Python.
Stars: ✭ 222 (-46.51%)
Mutual labels:  beautifier, formatter
tag-picker
Better tags input interaction with JavaScript.
Stars: ✭ 27 (-93.49%)
Mutual labels:  beautify, beautifier
pretty-remarkable
Plugin for prettifying markdown with https://github.com/jonschlinkert/remarkable using custom renderer rules.
Stars: ✭ 22 (-94.7%)
Mutual labels:  formatter, beautify

latexindent.pl

Build Status Build status Documentation Status

latexindent logo

latexindent.pl is a perl script to indent (add horizontal leading space to) code within environments, commands, after headings and within special code blocks.

It has the ability to align delimiters in environments and commands, and can modify line breaks.

version

latexindent.pl, version 3.9, 2021-03-14

author

Chris Hughes (cmhughes)

build status

I use both travis-ci (Linux) and AppVeyor (Windows) as continuous integration services to test latexindent.pl for a small selection of test cases for every commit (I use git to track changes in the many test cases listed in the test-cases directory); you can see which versions of perl are tested by travis-ci within .travis.yml.

Build Status Build status

documentation

For complete details, please see:

Windows executable

latexindent.exe is available at https://ctan.org/tex-archive/support/latexindent and is created using

  perl ppp.pl -u -o latexindent.exe latexindent.pl

using the Par::Packer perl module.

ppp.pl is located in the helper-scripts directory.

usage

You'll need

    latexindent.pl
    LatexIndent/*.pm
    defaultSettings.yaml

in the same directory. Windows users might prefer to get

    latexindent.exe
    defaultSettings.yaml

and latexindent.exe is available at https://ctan.org/tex-archive/support/latexindent.

perl modules

You'll need a few readily-available perl modules. Full details are given within the Appendix of the documentation; you might also like to see .travis.yml for Linux/MacOS users, and .appveyor.yml for Strawberry perl users.

testing

A nice way to test the script is to navigate to the test-cases directory, and then run the command (on Linux/Mac -- sorry, a Windows test-case version is not available):

    ./test-cases.sh

important

This script may not work for your style of formatting; I highly recommend comparing the outputfile.tex to make sure that nothing has been changed (or removed) in a way that will damage your file.

I recommend using each of the following:

  • a visual check, at the very least, make sure that each file has the same number of lines
  • a check using latexdiff inputfile.tex outputfile.tex
  • git status myfile.tex

feature requests

I'm happy to review feature requests, but I make no promises as to if they will be implemented; if they can be implemented, I make no promises as to how long it will take to implement them, and in which order I do so -- some features are more difficult than others! Feel free to post on the issues page of this repository.

development model

I follow the development model given here: http://nvie.com/posts/a-successful-git-branching-model/ which means that latexindent.pl always has (at least) two branches:

    master
    develop

The master branch always contains the released version and develop contains the development version. When developing a new feature or bug fix, I typically use:

    git checkout develop
    git checkout -b feature/name-of-feature

and then I merge it into the develop branch using

    git checkout develop
    git merge feature/name-of-feature --no-ff

perl version

I develop latexindent.pl on Ubuntu Linux, using perlbrew; I currently develop on perl version v5.28.1

related projects

You might like to checkout the following related projects on github.

arara: GitHub stars

atom-beautify: GitHub stars

quotes

I find that the following quotes resonate with me with regards to my approach to latexindent.pl:

  • I want people to use Perl. I want to be a positive ingredient of the world and make my American history. So, whatever it takes to give away my software and get it used, that's great. Larry Wall
  • A common, brute-force approach to parsing documents where newlines are not significant is to read ... the entire file as one string ... and then extract tokens one by one, Christiansen & Torkington, Perl Cookbook, Section 6.16
  • Once you understand the power that regular expressions provide, the small amount of work spent learning them will feel trivial indeed Friedl, Mastering Regular Expressions, end of Chapter 1.
  • a problem speaks to them, and they have to solve it...and it becomes a hobby. But they keep coming back to it every now and then. They keep tinkering. It will never be finished...that's the point of a hobby, Westwood to Reacher in 'Make Me', Lee Child
  • Do the best you can until you know better. Then when you know better, do better. Maya Angelou

changelog

changelog.md provides details of the history of the project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].