[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LaTeX-fill-environment: how to avoid line breaking for some lines in env
From: |
Uwe Brauer |
Subject: |
LaTeX-fill-environment: how to avoid line breaking for some lines in environments |
Date: |
Fri, 18 Nov 2022 17:40:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Hi all
While LaTeX-fill-environment works well in align, it breaks to «many
lines» in aligned environments, as the following example show
\documentclass[10pt,reqno]{amsart}
\usepackage{amsmath,amssymb,amsthm}
\begin{document}
before filling
\begin{align}
\label{eq:test:1}
&
- \left(1- \mu_p^{\prime}\right)
\left( 1 + \frac{\left\vert \nabla\phi \right\vert^{2}}{\left[ \left(
\partial_t\phi \right)^{2} - \left\vert \nabla\phi \right\vert^{2}\right]}
\right)
\left[
\left(\varkappa + D_t\Omega\right)\partial_t\Phi
+\delta^{ab}D_b\Omega \partial_a\Phi\right ]
\end{align}
After filling
\begin{align}
\label{eq:test:1}
&
- \left(1- \mu_p^{\prime}\right)
\left( 1 + \frac{\left\vert \nabla\phi \right\vert^{2}}{\left[ \left(
\partial_t\phi \right)^{2} - \left\vert \nabla\phi \right\vert^{2}\right]}
\right)
\left[
\left(\varkappa + D_t\Omega\right)\partial_t\Phi
+\delta^{ab}D_b\Omega \partial_a\Phi\right ]
\end{align}
However
Before filling
\begin{equation}
\label{eq:test:1}
\begin{aligned}
&
- \left(1- \mu_p^{\prime}\right)
\left( 1 + \frac{\left\vert \nabla\phi \right\vert^{2}}{\left[ \left(
\partial_t\phi \right)^{2} - \left\vert \nabla\phi \right\vert^{2}\right]}
\right)
\left[
\left(\varkappa + D_t\Omega\right)\partial_t\Phi
+\delta^{ab}D_b\Omega \partial_a\Phi\right ]
\end{aligned}
\end{equation}
after filling
\begin{equation}
\label{eq:test:1}
\begin{aligned}
& - \left(1- \mu_p^{\prime}\right) \left( 1 + \frac{\left\vert
\nabla\phi \right\vert^{2}}{\left[ \left( \partial_t\phi \right)^{2}
- \left\vert
\nabla\phi \right\vert^{2}\right]} \right) \left[ \left(\varkappa +
D_t\Omega\right)\partial_t\Phi +\delta^{ab}D_b\Omega
\partial_a\Phi\right ]
\end{aligned}
\end{equation}
\end{document}
A simple solution would be that the user could say add a % at the end of
line to indicate do not fill/break,
the other solution would to understand why aligned is treated
differently to aligned.
Thanks and regards
Uwe Brauer
--
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.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
smime.p7s
Description: S/MIME cryptographic signature
- LaTeX-fill-environment: how to avoid line breaking for some lines in environments,
Uwe Brauer <=