Latex 方程标签

Latex 方程标签

我有一个两列方程式的对齐环境。我想给每一行添加自定义标签,但对于前两行,我想在行中间添加一个公共标签。任何想法都将不胜感激。

这是我的代码:

\begin{align}
& \mbox{Replenishment Indicator:} & O_t  = & \{
      1,  \text{if } t=\sum_{\kappa=1}^k DIT_{\kappa} + PLT_k \tag{Output-O} \\
& & & \text{ for some $k$}; \hspace{0.3cm} \text{else, }0.  \} \\
& \mbox{Inventory Evolution:} & I_{t+1}^{ijmlp} =& (I_t^{ijmlp}-1)^+ + O_tf \tag{Output-I} \\
& \mbox{Per-day Unmet Demand:} & S_t^{ijmlp}  =& (1-I_t^{ijmlp})^+ \tag{Output-$S_t$}\\
& \mbox{Unmet Demand Fraction:} &  S^{ijmlp}  =& \sum_{t=0}^{3 \times 365} S_t^{ijmlp}  / 3 \times 365 \tag{Output-S} \\
& \mbox{Time to Fulfil Demand:}  & T^{ijmlp}  = & 3 \times 365 + \sum_{t=0}^{T^{ijmlp}} S_t^{ijmlp} \tag{Output-T} 
\end{align}

但我希望\tag{Output-O}同时对齐两行,而不仅仅是第一行,同时仍保持整个内容的对齐。有什么想法吗?

答案1

我不确定这是否是呈现数据的最佳方式。不过,一个卑鄙的伎俩似乎能给你想要的东西。

\documentclass{article}
\usepackage{amsmath}
\newcommand{\rb}[1]{\raisebox{3.5ex}{$\displaystyle#1$}}
\begin{document}
\begin{align}
& \rb{\text{Replenishment Indicator:}} & \rb{O_t}  &
  \rb{{}=\{1,\text{if }t=\sum_{\kappa=1}^k DIT_{\kappa}+PLT_k} \tag{Output-O} \\
& &  & \qquad\text{for some $k$}; \quad \text{else, }0.  \} \notag \\
& \text{Inventory Evolution:} & I_{t+1}^{ijmlp} &= (I_t^{ijmlp}-1)^+ + O_tf \tag{Output-I} \\
& \text{Per-day Unmet Demand:} & S_t^{ijmlp}  &= (1-I_t^{ijmlp})^+ \tag{Output-$S_t$}\\
& \text{Unmet Demand Fraction:} &  S^{ijmlp}  &= \sum_{t=0}^{3 \times 365} S_t^{ijmlp}  / 3 \times 365 \tag{Output-S} \\
& \text{Time to Fulfil Demand:}  & T^{ijmlp}  &= 3 \times 365 + \sum_{t=0}^{T^{ijmlp}} S_t^{ijmlp} \tag{Output-T} 
\end{align}
\end{document}

在此处输入图片描述

我会考虑一种不同的格式:

\documentclass{article}
\usepackage{amsmath,mathtools}

\begin{document}

\begin{align}
\shortintertext{Replenishment Indicator:}
  &O_t = \biggl\{1,\text{if }t=\sum_{\kappa=1}^k DIT_{\kappa}+PLT_k
    \text{ for some $k$}; \quad \text{else, }0.  \biggr\} \tag{Output-O} \\
\shortintertext{Inventory Evolution:}
  &I_{t+1}^{ijmlp} = (I_t^{ijmlp}-1)^+ + O_tf \tag{Output-I} \\
\shortintertext{Per-day Unmet Demand:}
  &S_t^{ijmlp} = (1-I_t^{ijmlp})^+ \tag{Output-$S_t$}\\
\shortintertext{Unmet Demand Fraction:}
  &S^{ijmlp} = \sum_{t=0}^{3 \times 365} S_t^{ijmlp}  / 3 \times 365 \tag{Output-S} \\
\shortintertext{Time to Fulfil Demand:}
  &T^{ijmlp} = 3 \times 365 + \sum_{t=0}^{T^{ijmlp}} S_t^{ijmlp} \tag{Output-T}
\end{align}

\end{document}

在此处输入图片描述

相关内容