emacs24 - Emacs: After Aquamacs update, Auto-Fill-Mode's Alt-q breaks lines at maths delimiter in LaTeX -
after updated aquamacs, using alt-q
(in auto-fill minor mode) fill paragraphs when editing latex document results in each line being broken @ first occurrence of latex maths closing delimiter, \)
. (well, almost! see example below 1 exception.)
version information: aquamacs 3.2 gnu emacs 24.4.51.2
.
question
how tell aquamacs/emacs/auto-fill mode not break lines @ first \)
sees on line, fill in paragraph used before update?
steps reproduce behaviour
help -> diagnose , report bug -> start aquamacs without customizations
"pristine" aquamacs window.- open file named
testemacs.tex
, paste lorem ipsum text, twice make 2 paragraphs. - add small maths expressions delimited latex delimiters
\(
,\)
, @ random places in second paragraph. leave first paragraph is. - type
alt-x auto-fill-mode
enable auto-fill mode. - go each paragraph , type
alt-q
invokefill-paragraph
function. - observe difference! see screenshot below:
as can see, everywhere except on last line, fill-paragraph
breaks line @ first closing delimiter \)
sees. makes paragraph ugly, , defeats whole purpose of filling-in paragraphs. how can rid of behaviour?
modes
please see screenshot below modes in operation:
this recent change in auctex. can customize variable latex-fill-break-at-separators
. default
(\\\( \\\) \\\[ \\\])
which according documentation means lines broken before or after these separators if whole expression not fit on line when filling. however, behaviour not quite , see unconditionally break line after closing delimiters \)
, \]
. removing inline math switches \(
, \)
list restores older behaviour. find removing \)
list give acceptable results, see example 2 below. in customization interface uncheck "closing inline math switches"
here concrete demonstration of different settings.
default value of
latex-fill-break-at-separators
, equivalent to(custom-set-variables '(latex-fill-break-at-separators (quote (\\\( \\\) \\\[ \\\]))))
gives following line break after each \)
:
let \( \gamma\colon \bbbr \times [0,t) \to \bbbr^2 \) family of regular curves solving~\eqref{eq:c-flow}, each curve \( \gamma^t \) of period~\( \psi \) , \( \gamma^0 \) strictly convex. let \( \kappa_0(t) \) minimum value of \( \kappa \) on \( \gamma^t \). note \( \kappa_0(t) \) achieved @ point \( (\psi,t) \), in particular \( \kappa_0(0) > 0 \).
without inline math closing
(custom-set-variables '(latex-fill-break-at-separators (quote (\\\( \\\[ \\\]))))
keeps math groups on line allows text after them:
let \( \gamma\colon \bbbr \times [0,t) \to \bbbr^2 \) family of regular curves solving~\eqref{eq:c-flow}, each curve \( \gamma^t \) of period~\( \psi \) , \( \gamma^0 \) strictly convex. let \( \kappa_0(t) \) minimum value of \( \kappa \) on \( \gamma^t \). note \( \kappa_0(t) \) achieved @ point \( (\psi,t) \), in particular \( \kappa_0(0) > 0 \).
without inline math delimiter
(custom-set-variables '(latex-fill-break-at-separators (quote (\\\[ \\\]))))
math groups may split on lines:
let \( \gamma\colon \bbbr \times [0,t) \to \bbbr^2 \) family of regular curves solving~\eqref{eq:c-flow}, each curve \( \gamma^t \) of period~\( \psi \) , \( \gamma^0 \) strictly convex. let \( \kappa_0(t) \) minimum value of \( \kappa \) on \( \gamma^t \). note \( \kappa_0(t) \) achieved @ point \( (\psi,t) \), in particular \( \kappa_0(0) > 0 \).
Comments
Post a Comment