Hi George,
You can change this behaviour by customizing the variable
Latex-fill-break-at-separators
I think it should work if you check "Opening Display Math
Switch" and "Closing Display Math Switch" and leave the
other options unchecked, in the customization menu for that
variable.
This change has been made because '$...$' and '\(...\)' were
behaving inconsistently with respect to paragraph-filling.
Developers: maybe it'd be good to change the default value
of "Latex-fill-break-at-separators" then?
Cheers,
J
On 20151023 14:25, George McNinch wrote:
Hi,
So via ELPA my auctex was recently updated from 11.88.8 to 11.88.9. Now
I experience odd behavior with fill-paragraph and text surrounded by $'s
(i.e. "TeX math mode") which I can (re)produce as follows:
* visit buffer "foo.tex" with (something like) the following contents:
-----------------------------------------------------------------
\documentclass{article}
\begin{document}
Foo bar $q$ Mauris ac felis vel velit tristique imperdiet Lorem ipsum
dolor sit amet, consectetuer adipiscing elit. Donec hendrerit tempor
\end{document}
-----------------------------------------------------------------
* put point in the "body paragraph"
* do M-q
(or M-x fill-paragraph )
* The buffer now contains
-----------------------------------------------------------------
\documentclass{article}
\begin{document}
Foo bar $q$
Mauris ac felis vel velit tristique imperdiet Lorem ipsum dolor sit
amet, consectetuer adipiscing elit. Donec hendrerit tempor
\end{document}
-----------------------------------------------------------------
Remarks:
* my emacs-version ===> 25.50.21
* This didn't happen to me with AucTeX 11.8.8 (and still doesn't, on a
machine where I didn't do yet the elpa update).
* If I just visit a buffer in TeX/P mode instead of LaTeX/P mode, the
filling oddity doesn't happen.
* there is no problem with single lines. e.g.
doing M-q on the "body paragraph" of
-----------------------------------------------------------------
\begin{document}
\documentclass{article}
Foo bar $q$ Mauris ac
\end{document}
-----------------------------------------------------------------
doesn't do anything odd.
Best,
gm
_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex