descriptionA LaTeX reformatter / beautifier
ownerfor_llf@sgilles.net
last changeMon, 2 Sep 2024 06:17:12 +0000 (2 02:17 -0400)
content tags
add:
README
This is LLF, which either stands for Lua LaTeX Formatter or LaTeX-Like
Formatter.  I forget which.

To use it, run

    lua /path/to/llf.lua < input.tex > output.tex

It should reformat your LaTeX in a way that preserves semantic meaning,
yet has intelligent indentation levels. It might not, since it doesn't
actually parse LaTeX, rather it parses a language which is almost LaTeX,
except for the whole Turing Complete bit.

Features:

 - Understands verbatim environments
 - Might handle your pseudocode environments right
 - Won't mangle your align* or tabular environments
 - Will treat everything between ‘%noformat{’ and ‘%}noformat’
   as verbatim
 - Acts like cat(1) if it can't parse your input
 - Configure by copying llfrc.lua to ${XDG_CONFIG_HOME}/llf/llfrc.lua
   or ${HOME}/.config/llf/llfrc.lua

Dependencies:

 - lpeg    http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html
 - wcwidth https://luarocks.org/modules/aperezdc/wcwidth
 - utf8    (Should be built-in in >=5.3, not sure about other versions)

Licensed under ISC.

Please report bugs to S. Gilles <for_llf@sgilles.net>. Minimal test
cases are great. Patches are even better.
shortlog
2024-09-02 S. Gillesupdate email addressesmaster
2020-06-18 S. Gillesalso include "aligned"
2020-06-18 S. GillesI hear people use tabu for tables these days
2020-02-11 S. Gilleslibmagic reports application/gzip now, not just x-gzip
2019-06-03 S. Gillesalignat is like align
2019-02-08 S. Gilles\= is also a control seq
2018-11-28 S. Gilles\path is like \draw
2018-09-22 S. GillesAdd fuzzer script (pick something recent off arXiv)v0.6
2018-09-22 S. Gilles\+ is not a control sequence, but some people define...
2018-09-22 S. GillesAllow control sequences to be followed by EOF
2018-09-22 S. Gilles\/ is a control sequence, too
2018-09-22 S. GillesMove \; into test 26 like all the others
2018-09-22 S. Gilles\| is a control sequence too
2018-09-22 S. GillesBe a bit more lenient on whether * is included in contr...
2018-09-21 S. GillesAnd \; is a control sequence as well.
2018-08-16 S. Gilles\- is a control sequence toov0.5
...
tags
6 years ago v0.6
6 years ago v0.5
7 years ago v0.4
7 years ago v0.3
7 years ago v0.2
7 years ago v0.1
heads
3 weeks ago master
7 years ago mob