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

  1. help -> diagnose , report bug -> start aquamacs without customizations "pristine" aquamacs window.
  2. open file named testemacs.tex , paste lorem ipsum text, twice make 2 paragraphs.
  3. add small maths expressions delimited latex delimiters \( , \), @ random places in second paragraph. leave first paragraph is.
  4. type alt-x auto-fill-mode enable auto-fill mode.
  5. go each paragraph , type alt-q invoke fill-paragraph function.
  6. observe difference! see screenshot below:

image showing line breaks @ maths delimiters

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:

modes information

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.

  1. 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 \). 
  1. 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 \). 
  1. 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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -