forked from ffrohn/latexbreak
-
Notifications
You must be signed in to change notification settings - Fork 1
/
latexbreak.config
19 lines (19 loc) · 1.45 KB
/
latexbreak.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# \[ is an escaped opening square bracket. So occurrences of "\[" (start of display math) in the document are considered to be occurrences of the "macro" [.
break_around_macro: begin, end, \[, \], newpage, pagebreak, noindent, medskip, smallskip, bigskip, part\*?, section\*?, subsection\*?, subsubsection\*?, paragraph\*?
# \ is an escaped backslash. So occurrences of "\\" (linebreak) in the document are considered to be occurrences of the "macro" \.
break_after_macro: newline, linebreak, \\, label
break_before_macro: item
remove_newlines: true
break_after_sentences: true
begin_protect: .*\\begin\{(verbatim|listing|algorithm)\}.*
end_protect: .*\\end\{(verbatim|listing|algorithm)\}.*
# \[ plus all kinds of math environments, started (\begin{align*}) and unstared (\begin{align}) versions
begin_protect_sentences: .*((\\\[)|(\\begin\{((equation\*?)|(align\*?)|(eqnarray\*?)|(multline\*?)|(gather\*?)|(flalign\*?)|(alignat\*?))\})).*
end_protect_sentences: .*((\\\])|(\\end\{((equation\*?)|(align\*?)|(eqnarray\*?)|(multline\*?)|(gather\*?)|(flalign\*?)|(alignat\*?))\})).*
line_ends: ., !, ?, :
# inline math environments
begin_protect_sentences_inline: \$|\\\(
end_protect_sentences_inline: \$|\\\(
# don't remove linebreaks before or after curly brackets
protect_break_after: .*(\{|\})
protect_break_before: (\{|\}).*