我怎样才能让底部支撑标签有多行?
--\/--
A cost
[A]
这是一些虚拟方程,用来显示我已经拥有的东西。
\documentclass[twocolumn]{article}
\usepackage{color, etoolbox, lipsum, mathtools, geometry}
\usepackage{cuted, textcomp, setspace, longtable, tabularx, array}
\begin{document}
\twocolumn[
{
\begin{equation}
c()=
\begin{cases}
\underbrace{A'^{hr} \cdot Z^{\text{g}}}_{\textsubscript{A\ cost}}
+ \underbrace{f(\Upsilon'^{hr}) \cdot ~'^{\text{get}} \cdot F^{ca}}_{\textsubscript{B\ cost}}
+ \underbrace{B'^{\text{get}} \cdot F^{t}}_{\textsubscript{C\ cost}}
\right) & \text{if}\ B'^{\text{r}}=0 \\
1 & \text{otherwise.}
\end{cases}
\end{equation}
}\bigskip]
\end{document}
输出如下:
答案1
使用array
环境。顺便改进了一些代码,修改了一些错误。
\documentclass[twocolumn]{article}
\usepackage{color, etoolbox, lipsum, mathtools, geometry}
\usepackage{cuted, textcomp, setspace, longtable, tabularx, array}
\begin{document}
\twocolumn[
{
\begin{equation}
c()=
\begin{cases}
\underbrace{A'^{\mathrm{hr}} \cdot Z^{\mathrm{g}}}_{\begin{array}{c}A\text{ cost}\\[-0.5ex] [\mathbf{A}]\end{array}}
+ \underbrace{f(\Upsilon'^{\mathrm{hr}}) \cdot ~'^{\mathrm{get}} \cdot F^\mathrm{ca}}_{\begin{array}{c}B\text{ cost}\\[-0.5ex] [\mathbf{B}]\end{array}}
+ \underbrace{B'^{\mathrm{get}} \cdot F^{\mathrm{t}}}_{\begin{array}{c}C\text{ cost}\\[-0.5ex] [\mathbf{C}]\end{array}}
& \text{if}\ B'^{\mathrm{r}}=0; \\
1 & \text{otherwise.}
\end{cases}
\end{equation}
}\bigskip]
\end{document}
答案2
我建议您使用\substack
宏在每个下方创建间距紧凑的两行项目\underbrace
。
由于您正在处理双列布局,我认为对于第一种情况还需要插入额外的换行符。
\documentclass[twocolumn]{article}
%\usepackage{color, etoolbox, lipsum, mathtools, geometry}
%\usepackage{cuted, textcomp, setspace, longtable, tabularx, array}
\usepackage{mathtools,geometry}
\begin{document}
\begingroup % limit scope of next instruction
\small
\begin{equation}
c()=
\begin{dcases*}
\begin{aligned}[b]
\underbrace{A^{\prime hr} Z^{\mathrm{g}}\mathstrut}_{%
\substack{\text{A cost} \\ [\mathbf{A}]}}
&+ \underbrace{f(\Upsilon^{\prime hr}) ~^{\prime \mathrm{get}} F^{ca}}_{%
\substack{\text{B cost} \\ [\mathbf{B}]}} \\
&+ \underbrace{B^{\prime \mathrm{get}} F^{t}}_{%
\substack{\text{C cost} \\ [\mathbf{C}]}}
\end{aligned}
& if $B^{\prime \mathrm{r}}=0$ \\
1 & otherwise.
\end{dcases*}
\end{equation}
\endgroup
\end{document}