flalign 对我来说不起作用

flalign 对我来说不起作用

我想使用 flalign 左对齐我的方程式。但是,它在某些地方有效,在其他地方无效。下面是我的代码示例

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
%%%%%%No Hypernation%%%%%
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
%%%%%%%%%%%%%%%%%%

\title{Homework 3}
\begin{document}
\newcommand{\pd}[2]{\dfrac{d #1}{d #2}}
\begin{enumerate}


\item Write an ODE file to return the following derivatives
\begin{flalign*}
\pd{n}{t} &= \left( 1-n \right) \alpha_n\left( V\right)-n\beta_n\left(V\right)\\
\pd{m}{t} &= \left( 1-m \right) \alpha_m\left( V\right)-m\beta_m\left(V\right)\\
\pd{h}{t} &= \left( 1-h \right) \alpha_h\left( V\right)-h\beta_h\left(V\right)\\
\pd{V}{t} &=-\dfrac{1}{C}\left(G_kn^4\left(V-E_k\right)+G_{Na}m^3h\left(V-E_{Na}\right)+G_L\left(V-E_L\right)\right)
\end{flalign*}
and the following constants ( $C$ is membrane capacitance, $G$ are the conductances and
$E$ are the reversal potentials of the potassium ( $K$ ), sodium ( $Na$ ), and leak ( $L$ )
channels):
\begin{flalign*}
\alpha\\
C &=1\\
G_K  &= 36\\
G_{Na} &= 120\\
G_L &= 0.3\\
E_K  &= -72\\
E_{Na} &= 55\\
E_L &= -49.4
\end{flalign*}
\end{enumerate}
\end{document}

答案1

对齐应与包的选项一起使用,align或者align*与包的左对齐。fleqnamsmath

在我看来,常量块每行应该使用两个(甚至三个)常量,而不是一个大列。

我已将其改为differentials d使用直立字符。

\documentclass[12pt]{article}
\usepackage[fleqn]{amsmath}
\usepackage{amsfonts}
%%%%%%No Hypernation%%%%%
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
%%%%%%%%%%%%%%%%%%

\newcommand{\mathup}[1]{\mathrm{#1}}%

\title{Homework 3}
\begin{document}
\newcommand{\pd}[2]{\dfrac{\mathup{d} #1}{\mathup{d} #2}}
\begin{enumerate}


\item Write an ODE file to return the following derivatives
\begin{align*}
\pd{n}{t} &= \left( 1-n \right) \alpha_n\left( V\right)-n\beta_n\left(V\right)\\
\pd{m}{t} &= \left( 1-m \right) \alpha_m\left( V\right)-m\beta_m\left(V\right)\\
\pd{h}{t} &= \left( 1-h \right) \alpha_h\left( V\right)-h\beta_h\left(V\right)\\
\pd{V}{t} &=-\dfrac{1}{C}\left(G_kn^4\left(V-E_k\right)+G_{Na}m^3h\left(V-E_{Na}\right)+G_L\left(V-E_L\right)\right)
\end{align*}
and the following constants ( $C$ is membrane capacitance, $G$ are the conductances and
$E$ are the reversal potentials of the potassium ( $K$ ), sodium ( $Na$ ), and leak ( $L$ )
channels):

\begin{align*}
\alpha & & C           &=1\\
G_K  &= 36 & G_{Na}  &= 120\\
G_L &= 0.3 & E_K  &= -72\\
E_{Na} &= 55 & E_L &= -49.4 
\end{align*}

% All in a column %

\begin{align*}
\alpha\\
C &=1\\
G_K  &= 36\\
G_{Na} &= 120\\
G_L &= 0.3\\
E_K  &= -72\\
E_{Na} &= 55\\
E_L &= -49.4
\end{align*}

\end{enumerate}
\end{document}

在此处输入图片描述

答案2

使用

\documentclass[12pt,fleqn]{article}

相关内容