我想将这些等式在等号上对齐(以便花括号齐平),并将右侧的“范围”在“t”上对齐。有人能帮忙吗?
\begin{equation}
c(t)=\left\{\begin{matrix}
0 & 0<t<\Delta t \\
\alpha e^{-t/T_{1b}} & \Delta t<t<\Delta t + \tau \\
0 & t>\Delta t + \tau
\end{matrix}\right
\end{equation}
\begin{equation}
\Delta M(t)=\left\{\begin{matrix}
0 & 0<t<\Delta t \\
2M_{0B} f(t-\delta t)\alpha e^{-t/T_{1B}} q_p(t)& \Delta t<t<\Delta t + \tau \\
2M_{0B}f\tau \alpha e^{-t/T_{1B}} & t>\Delta t + \tau
\end{matrix}\right
\end{equation}
答案1
使用align
环境:
对齐右侧需要进行更多调整,方法是使用\makebox
适当宽度的,和/或使用\hphantom{}
插入额外间距。
如果希望左侧居中,则用输入的对齐方式替换r
右侧c
:
\newcommand*{\MakeBox}[1]{\makebox[\widthof{\WidestText}][c]{$#1$}}
产量:
笔记;
- 你
\left\{
需要有一个匹配的\right.
(.
需要的)
代码:
\documentclass{article}
\usepackage{amsmath}
\usepackage{calc}
\newcommand*{\WidestText}{$2M_{0B} f(t-\delta t)\alpha e^{-t/T_{1B}} q_p(t)$}
\newcommand*{\MakeBox}[1]{\makebox[\widthof{\WidestText}][l]{$#1$}}
\newcommand*{\WideAsDeltaT}[1]{\makebox[\widthof{$\Delta t$}][r]{$#1$}}
\newcommand*{\WideAsDeltaTPlusT}[1]{\makebox[\widthof{$\Delta t + \tau$}][l]{$#1$}}
\begin{document}
\begin{align}
c(t)&=\left\{\begin{matrix}
\MakeBox{0} & \WideAsDeltaT{0}<t<\WideAsDeltaTPlusT{\Delta t} \\
\MakeBox{\alpha e^{-t/T_{1b}}} & \Delta t<t<\Delta t + \tau \\
\MakeBox{0} & \hphantom{\Delta t <{}} t >\Delta t + \tau
\end{matrix}\right. \\
%
\Delta M(t) &=\left\{\begin{matrix}
\WideAsDeltaT{0} & \WideAsDeltaT{0}<t< \WideAsDeltaTPlusT{\Delta t} \\
2M_{0B} f(t-\delta t)\alpha e^{-t/T_{1B}} q_p(t)& \Delta t<t<\Delta t + \tau \\
2M_{0B}f\tau \alpha e^{-t/T_{1B}} & \hphantom{\Delta t <{}} t>\Delta t + \tau
\end{matrix}\right.
\end{align}
\end{document}
答案2
下面使用cases
一些\phantom
/over lap
ping 来实现适当的布局:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}
c(t)=\left\{\begin{matrix}
0 & 0 < t < \Delta t \\
\alpha e^{-t/T_{1b}} & \Delta t < t < \Delta t + \tau \\
0 & t > \Delta t + \tau
\end{matrix}\right.
\end{equation}
\begin{equation}
\Delta M(t)=\left\{\begin{matrix}
0 & < t < \Delta t \\
2M_{0B} f(t-\delta t)\alpha e^{-t/T_{1B}} q_p(t)& \Delta t < t <\Delta t + \tau \\
2M_{0B}f\tau \alpha e^{-t/T_{1B}} & t > \Delta t + \tau
\end{matrix}\right.
\end{equation}
\begin{align}
c(t) &= \begin{cases}
\mathrlap{0}\hphantom{2M_{0B} f(t-\delta t)\alpha e^{-t/T_{1B}} q_p(t)} & \hphantom{\Delta t}\mathllap{0} < t < \Delta t \\
\alpha e^{-t/T_{1b}} & \Delta t \leq t < \Delta t + \tau \\
0 & \hphantom{\Delta t <{}} t \geq \Delta t + \tau
\end{cases} \\
\Delta M(t) &= \begin{cases}
0 & \hphantom{\Delta t}\mathllap{0} < t < \Delta t \\
2M_{0B} f(t-\delta t)\alpha e^{-t/T_{1B}} q_p(t) & \Delta t \leq t < \Delta t + \tau \\
2M_{0B}f\tau \alpha e^{-t/T_{1B}} & \hphantom{\Delta t <{}} t \geq \Delta t + \tau
\end{cases}
\end{align}
\end{document}
mathtools
提供与eft 和/或ight重叠内容的数学等价\llap
物。\rlap
l
r