Skip to content

Commit

Permalink
Documentation in README
Browse files Browse the repository at this point in the history
  • Loading branch information
WGUNDERWOOD committed Aug 31, 2024
1 parent 24fe6b9 commit 1d97092
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 1d97092

Please sign in to comment.