[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] (was: a problem with LaTeX-fill-environment)

From: Uwe Brauer
Subject: [SOLVED] (was: a problem with LaTeX-fill-environment)
Date: Tue, 10 Jan 2023 17:59:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> Hi Uwe,

> No, it doesn't reproduce for me. The environment stays the original form
> when I type C-c C-q C-e inside the equation* environment. I guess
> something in your personal customization are involved.

Actually it is. I found the culprit

It is a function that fills each paragraph in a way that each sentence
starts in a new line. I find it very convenient and proposed, with the
permission of Ingo of course to include in AucTeX, but the idea got

Indeed a unwanted collateral damage is the strange filling I mentioned
because of the fullstop in 
\left.  f(x)  \right|_{x=x_{c}}

In case you are interested (and it seems that you are interested somehow
in filling and indenting questions) here is his code

;; Ingo Lohmar
;; Modified from

(defadvice LaTeX-fill-region-as-paragraph (around LaTeX-sentence-filling)
  "Start each sentence on a new line."
  (let ((from (ad-get-arg 0))
        (to-marker (set-marker (make-marker) (ad-get-arg 1)))
    (while (< from (marker-position to-marker))
      ;; might have gone beyond to-marker---use whichever is smaller:
      (ad-set-arg 1 (setq tmp-end (min (point) (marker-position to-marker))))
      (ad-set-arg 0 (setq from (point)))
      (unless (or (looking-back "^\\s *")
                  (looking-at "\\s *$"))
    (set-marker to-marker nil)))



Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]