左对齐公式,但 flalign 或 \documentclass[fleqn] 不起作用

左对齐公式,但 flalign 或 \documentclass[fleqn] 不起作用

我尝试将方程式左对齐,但它们却右对齐。我尝试使用flalign代替align\documentclass[fleqn]或两者,但不起作用。

在此处输入图片描述

\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage[utf8]{inputenc}

\begin{document}

\begin{align}
\vec{l}(t) = \vec{a} + (\vec{b}-\vec{a}) t
\\ \vec{l}(0) = \vec{a}
\\ \vec{l}(1) = \vec{b}
\\ \vec{dl} = (\vec{b}-\vec{a}) dt
%
\\ r(t) = r_a + (r_b - r_a) t
\\ r(0) = r_a
\\ r(1) = r_b
\\ dr = (r_b - r_a) dt
\\ dt = \frac{1}{r_b-r_a} dr
\\ \vec{dl} = (\vec{b}-\vec{a}) \frac{1}{r_b - r_a} dr
%
\\ E(r) = \frac{k_0 q}{r^2}
%
\\ \int_{\vec{a}}^{\vec{b}} {\vec{E} \cdot \vec{dl}}
\\ = \int_a^b {\vec{E} \cdot (\vec{b}-\vec{a})\ \frac{1}{r_b-r_a} dr}
\\ = - \int_{r_a}^{r_b} {E \|\vec{b}-\vec{a}\| \ \frac{1}{r_b-r_a} dr}
\\ = - \int_{r_a}^{r_b} {E (-1) dr} \quad \text{because}\ \|\vec{b} - \vec{a}\| = -(r_b - r_a) \text{ because } r_b < r_a
\\ = \int_{r_a}^{r_b} {E dr}
\\ = \int_{r_a}^{r_b} {\frac{k_0 q}{r^2} dr}
\\ \implies \int{\vec{E}\vec{dl}} < 0 \quad \text{because}\ r_b < r_a
\\ \implies \Delta V = > 0
\end{align}

$\Delta V$ est la diff\'erence de potentiel du point A au point B.

La diff\'erence est bien positive car $V_B > V_A$ (voir tp 3 sur la capacit\'e).
\end{document}

答案1

这也有助于您解决需求:

\documentclass[a4paper]{article}
\usepackage[fleqn]{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage[utf8]{inputenc}
\makeatletter
\def\@mathmargin{0pt}
\makeatother
\usepackage{showframe}
\begin{document}

\begin{align}
\vec{l}(t) &= \vec{a} + (\vec{b}-\vec{a}) t\\
\vec{l}(0) &= \vec{a}\\ 
\vec{l}(1) &= \vec{b}\\ 
\vec{dl} &= (\vec{b}-\vec{a}) dt\\ 
r(t) &= r_a + (r_b - r_a) t\\ 
r(0) &= r_a\\ 
r(1) &= r_b\\ 
dr &= (r_b - r_a) dt\\
dt &= \frac{1}{r_b-r_a} dr\\ 
\vec{dl} &= (\vec{b}-\vec{a}) \frac{1}{r_b - r_a} dr\\
E(r) &= \frac{k_0 q}{r^2}\\ 
&\quad\int_{\vec{a}}^{\vec{b}} {\vec{E} \cdot \vec{dl}}\\ 
&= \int_a^b {\vec{E} \cdot (\vec{b}-\vec{a})\ \frac{1}{r_b-r_a} dr}\\
&= - \int_{r_a}^{r_b} {E \|\vec{b}-\vec{a}\| \ \frac{1}{r_b-r_a}
dr}\\  
&= - \int_{r_a}^{r_b} {E (-1) dr} \quad \text{because}\ \|\vec{b} -
\vec{a}\| = -(r_b - r_a) \text{ because } r_b < r_a\\  
&= \int_{r_a}^{r_b} {E dr}\\ 
&= \int_{r_a}^{r_b} {\frac{k_0 q}{r^2} dr}\\ 
&\quad\implies \int{\vec{E}\vec{dl}} < 0 \quad \text{because}\ r_b <
r_a\\  
&\quad \implies \Delta V = > 0
\end{align}

$\Delta V$ est la diff\'erence de potentiel du point A au point B.

La diff\'erence est bien positive car $V_B > V_A$ (voir tp 3 sur
la capacit\'e).
\end{document}

相关内容