在等式中的两个位置对齐并将中间项居中

在等式中的两个位置对齐并将中间项居中

这是我的示例。我尝试对齐两组<,如果可能的话,将中间项放在第二行的中心。

\documentclass{article}

\usepackage[semibold,tt=false]{libertine}
\usepackage{libertinust1math}
\usepackage{siunitx}
\newcommand{\longsymbolone}{\delta\Delta\Phi_{\text{cell}(\text{IL, }\SI{0}{\percent})}}
\newcommand{\longsymboltwo}{\delta\Delta\Phi_{\text{cell}}(\text{PIL, B0})}
\newcommand{\longsymbolthree}{\delta\Delta\Phi_{\text{cell}}(\text{PIL, B0})}

\begin{document}

\begin{equation}
\begin{aligned}
  \longsymbolone &< \longsymboltwo < \longsymbolthree\\
  \SI[separate-uncertainty]{0.01(12)}{\volt} &< \SI[separate-uncertainty]{-0.02(10)}{\volt} < \SI[separate-uncertainty]{0.01(16)}{\volt}
\end{aligned}
\end{equation}

\end{document}

姆韦

答案1

使用包装可以轻松实现这eqparbox一点,它使用一个标签系统来命令盒子,这样两个带有相同标签的盒子就有最宽内容的自然宽度。

\documentclass{article}

\usepackage[semibold,tt=false]{libertine}
\usepackage{libertinust1math}
\usepackage{siunitx}
\newcommand{\longsymbolone}{\delta\Delta\Phi_{\text{cell}(\text{IL, }\SI{0}{\percent})}}
\newcommand{\longsymboltwo}{\delta\Delta\Phi_{\text{cell}}(\text{PIL, B0})}
\newcommand{\longsymbolthree}{\delta\Delta\Phi_{\text{cell}}(\text{PIL, B0})}

\usepackage{eqparbox}
\newcommand{\eqmathbox}[2][M]{\eqmakebox[#1]{$\displaystyle #2$}}

\begin{document}

\begin{equation}
\begin{aligned}
  \longsymbolone &< \eqmathbox{\longsymboltwo} < \longsymbolthree\\
  \SI[separate-uncertainty]{0.01(12)}{\volt} &< \eqmathbox{\SI[separate-uncertainty]{-0.02(10)}{\volt}} < \SI[separate-uncertainty]{0.01(16)}{\volt}
\end{aligned}
\end{equation}

\end{document} 

在此处输入图片描述

答案2

很简单,使用array

\documentclass{article}

\usepackage[semibold,tt=false]{libertine}
\usepackage{libertinust1math}
\usepackage{siunitx,array}
\newcommand{\longsymbolone}{\delta\Delta\Phi_{\text{cell}(\text{IL, }\SI{0}{\percent})}}
\newcommand{\longsymboltwo}{\delta\Delta\Phi_{\text{cell}}(\text{PIL, B0})}
\newcommand{\longsymbolthree}{\delta\Delta\Phi_{\text{cell}}(\text{PIL, B0})}

\begin{document}

\begin{equation}
\renewcommand{\arraystretch}{1.2}
\setlength{\arraycolsep}{0pt}
\sisetup{separate-uncertainty}
\begin{array}{r >{{}}c<{{}} c >{{}}c<{{}} l}
  \longsymbolone       &<& \longsymboltwo        &<& \longsymbolthree\\
  \SI{0.01(12)}{\volt} &<& \SI{-0.02(10)}{\volt} &<& \SI{0.01(16)}{\volt}
\end{array}
\end{equation}

\end{document}

在此处输入图片描述

相关内容