
我有兩個方程式:第一個方程式需要分解為兩行(例如,使用多行),以便方程式的其餘部分在第二行上右對齊。我想讓第二個方程式與第一個方程式對齊(即它們的等號對齊),但我似乎不知道如何對齊它和讓第一個方程式的第二部分右對齊。
範例1:
\documentclass[letterpaper,12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{multline}
\frac{dB}{dt} \approx - 0.092409 \left( 22.2674 e^{-0.092409 t}+77.7326 e^{-0.0258637 t} \right)
\nonumber \\
-\left( 200 \frac{\ln{\frac{1}{2}}}{26.8} \right) \exp{\left(\dfrac{\ln{\frac{1}{2}}}{26.8}t \right)}
\nonumber \\
\approx 2.057708e^{-0.092409 t}+7.18319e^{-0.0258637 t}
\end{multline}
\end{document}
我將所有內容都放在multline
環境中,但第二個方程式與第一個方程式不一致。
範例2:
\documentclass[letterpaper,12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\frac{dB}{dt} &\approx - 0.092409 \left( 22.2674 e^{-0.092409 t}+77.7326 e^{-0.0258637 t} \right)
\nonumber \\
-\left( 200 \frac{\ln{\frac{1}{2}}}{26.8} \right) \exp{\left(\dfrac{\ln{\frac{1}{2}}}{26.8}t \right)}
\nonumber \\
&\approx 2.057708e^{-0.092409 t}+7.18319e^{-0.0258637 t}
\end{align}
\end{document}
在這裡,我將所有內容都放在一個一致的環境中。第一個方程式和第二個方程式對齊,但第一個方程式的第二部分左對齊/兩端對齊。我希望它右對齊,第一行和第三行左對齊/對齊。
答案1
這並不能真正回答你的問題,但可能會解決你的問題。
用常數來簡化方程式怎麼樣?我添加了一個微分宏\diff{}{}
(應該用直立的 d 編寫,因為它是一個運算符)。順便說一句,常數可能有更好的選擇。
\documentclass[letterpaper,12pt]{article}
\usepackage{amsmath}
\newcommand{\diff}[2]{\frac{\mathrm{d}#1}{\mathrm{d}#2}}
\begin{document}
\begin{equation}
\diff{B}{t} = a_1(b_1e^{c_1t}+b_2e^{-c_2t}) - \left(a_2\frac{\ln{\frac{1}{2}}}{b_3} \right) \exp \left(\frac{\ln{\frac{1}{2}}}{b_3}\right)
\end{equation}
%
where the constants $a_i$, $b_i$, and $c_i$ are
%
\begin{align*}
a_1 &= -0.092409, && a_2 = 200, && \\
b_1 &= 22.2674, && b_2 = 77.7326, && b_3 = 26.8, \\
c_1 &= -0.092409, && c_2 = -0.0258637, &&
\end{align*}
%
such that
%
\begin{equation}
\diff{B}{t} \approx 2.057708e^{-0.092409 t}+7.18319e^{-0.0258637 t}
\end{equation}
\end{document}
答案2
我認為這就是您想要實現的目標,但看起來並不漂亮。
這是基於egreg的解決方案\h填入數學模式
\documentclass[letterpaper,12pt]{article}
\usepackage{amsmath}
% from https://tex.stackexchange.com/questions/83509/hfill-in-math-mode
\makeatletter
\newcommand{\specialcell}[1]{\ifmeasuring@#1\else\omit$\displaystyle#1$\ignorespaces\fi}
\makeatother
\begin{document}
\begin{align}
\begin{split}
\frac{dB}{dt} & \approx - 0.092409 \left( 22.2674 e^{-0.092409 t}+77.7326 e^{-0.0258637 t} \right)
\nonumber \\
& \specialcell{
\hfill -\left( 200 \frac{\ln{\frac{1}{2}}}{26.8} \right) \exp{\left(\dfrac{\ln{\frac{1}{2}}}{26.8} \right)}
}
\nonumber \\
& \approx 2.057708e^{-0.092409 t}+7.18319e^{-0.0258637 t}
\end{split}
\end{align}
\end{document}
答案3
一個簡單的解決方案,aligned
裡面有一個環境align
。我冒昧地在分割公式的第二行強制使用較小的括號。
\documentclass[l2pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\frac{dB}{dt} & \approx\!\begin{aligned}[t] - 0.092409 \left( 22.2674 e^{-0.092409 t}+77.7326 e^{-0.0258637 t} \right)
\\[-1ex]
-\Bigl( 200 \frac{\ln{\frac{1}{2}}}{26.8} \Bigr) \exp{\Bigl(\dfrac{\ln{\frac{1}{2}}}{26.8}t \Bigr)}
\end{aligned}
\nonumber \\[1ex]
& \approx 2.057708e^{-0.092409 t}+7.18319e^{-0.0258637 t}
\end{align}
\end{document}
答案4
嘗試這個
\documentclass[letterpaper,12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\frac{dB}{dt} &\approx - 0.092409 \left( 22.2674 e^{-0.092409 t}+77.7326 e^{-0.0258637 t} \right)
\nonumber \\
&\phantom{\approx\ } -\left( 200 \frac{\ln{\frac{1}{2}}}{26.8} \right) \exp{\left(\dfrac{\ln{\frac{1}{2}}}{26.8}t \right)}
\nonumber \\
&\approx 2.057708e^{-0.092409 t}+7.18319e^{-0.0258637 t}
\end{align}
\end{document}