diff --git a/README.md b/README.md index b2551dc..d7bb8b1 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,29 @@ tex-fmt -k file.tex # keep lines, do not wrap tex-fmt -h # view help information ``` +### Disabling the formatter + +Ending a source line with `% tex-fmt: skip` disables the formatter for that line. +To disable the formatter for a block, use `% tex-fmt: off` and `% tex-fmt: on`. + +``` tex +\documentclass{article} + +\begin{document} + +This line is skipped % tex-fmt: skip + +% tex-fmt: off + These lines are also + not formatted or wrapped +% tex-fmt: on + +\end{document} +``` + +Verbatim environments including `verbatim`, `Verbatim`, `lstlisting` +and `minted`, are automatically skipped. + ## Performance When formatting all of the test cases, @@ -105,6 +128,11 @@ tex-fmt is over a thousand times faster than latexindent. | --- | --- | --- | --- | --- | --- | | 49 | 94k | 3.5M | **0.096s** | 97s [x1001] | 125s [x1288] | +## Contribution + +Please feel free to open an issue or submit a pull request, +including as much information as you can. + ## Limitations - Semantic parsing of LaTeX code not conducted