auctex-devel
[Top][All Lists]
Advanced

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

Re: don't fill (break) a specific line in an equation (using % at the en


From: Ikumi Keita
Subject: Re: don't fill (break) a specific line in an equation (using % at the end?)
Date: Tue, 14 Nov 2023 21:20:37 +0900

>>>>> Uwe Brauer <oub@mat.ucm.es> writes:
> Hi all

> I usually have auto-fill on and use its filling properties for long
> lines in equations by just jumping to the end of that line an typing
> space.

> However there are some equations for which I do not want to break a
> line not even accidently.

> So I thought putting a % at the very end of the line (without a space)
> would do the thing, but it does not.

> Here is an example 
> \begin{equation}
>   \label{eq:nordstroem-field:38}
>   \left\Vert F(u) \right\Vert_{H^{m}}=\left\Vert G(u)+1 
> \right\Vert_{H^{m}}\leq \left\Vert G(u) \right\Vert_{H^{m}}+1\leq C \left( 
> \left\Vert u \right\Vert_{L^{\infty}} \right)+1% 
>   \leq C \left( \left\Vert u \right\Vert_{L^{\infty}} \right)\left( 
> 1+\left\Vert u \right\Vert_{H^{m}} \right)
> \end{equation}
> So under no circumstance should emacs break the line after +1%

> But it does. I thought this feature was implemented a long time ago.
> What do I miss?

How about `auto-fill-inhibit-regexp'? I expect
(add-hook 'LaTeX-mode-hook
          (lambda ()
              (setq-local auto-fill-inhibit-regexp ".*% *$")))
would do the job (but didn't test it for myself).

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopTheGenocide #CeasefireNOW



reply via email to

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