In Org Mode fill-paragraph
brakes the following paragraph (containing LaTeX displayed equation)
* Some headline
Text text text
\[
e=mc^2
\]
text text text.
into
* Some headline
Text text text \[ e=mc^2 \] text text text.
so the Org Mode form (with LaTeX preview) no longer reflects the LaTeX layout.
How can I prevent fill-paragraph from breaking LaTeX displayed equations?
UPDATE (edited on 11.04.2017)
By hacking org-element.el
file I've modified org-element-paragraph-separate
variable (in place of its definition). Now it includes also the "\\\\\\["
regexp, so \[
is recognized as a place when new paragraph begins. The attempt to modify the org-element-paragraph-separate
in my init file has failed.
Unfortunately this is only a halfway solution: running fill-paragraph
with cursor point before \[
does not break the equation, as expected, but when I run fill-paragraph
having the cursor after \[
the paragraph changes to
* Some headline
Text text text
\[ e=mc^2 \] text text text.
\begin{equation} ... \end{equation}
syntax. The latter isn't modified when I'm callingfill-paragraph
in the "Text text text" line. I have no LaTeX environment ready to test the inline\[ e=mc^2 \]
formatting – p_wiersig Dec 6 '16 at 23:36\[ ... \]
can be compared toequation*
environment or better todisplaymath
so (in LaTeX) there is a new line after\[
and\]
and the equation is centered. – premopie Dec 7 '16 at 11:12