LaTeX One-Sentence-Per-Line Formatter
Paste LaTeX source and get it back with each sentence on its own line — so version-control diffs only show the sentence that actually changed, instead of a whole reflowed paragraph. Safely skips math mode, comments, verbatim/lstlisting blocks, and abbreviations like "e.g." and "i.e." so it won't mangle your document. Runs entirely in your browser.
Why does putting each sentence on its own line help git diffs?
When a paragraph is hard-wrapped at a fixed column width, changing one word can shift every line after it, so a diff shows the entire paragraph as changed even though only a few words differ. With one sentence per line, editing a single sentence only changes that one line, so diffs stay small and reviewable.
Why can't I just insert a newline after every period?
Because LaTeX source has periods that aren't sentence ends:
abbreviations like e.g., i.e.,
etc., and Fig.; decimal numbers;
periods inside math mode ($...$,
\(...\), \[...\]); and periods inside
comments or verbatim/lstlisting blocks that must be left
untouched. This tool parses the LaTeX structure first, then
only breaks at real sentence boundaries in ordinary prose.
Does this tool upload my document anywhere?
No. Your LaTeX source is formatted entirely in your browser and never sent to a server.
Need this in a script instead of a browser?
The same formatting logic is also a small dependency-free
CLI/library:
npx github:diwaspoudell/latex-sentence-per-line —
see
github.com/diwaspoudell/latex-sentence-per-line.