投影仪幻灯片中表格多行环境中缺少值

投影仪幻灯片中表格多行环境中缺少值

我想在 beamer 中添加这个表,但是当我使用多行环境时,表中不会显示多行的值。

我的 MWE 是

\documentclass[xcolor=table]{beamer}

\usepackage{adjustbox}

\usepackage{array}

\usepackage{multirow}


\begin{document}


\begin{frame}{Financial Ind}


\centering

\adjustbox{max height=\dimexpr\textheight-5.5cm\relax,
           max width=\textwidth}{

\rowcolors{1}{tableShade}{white}

\rowcolors[]{2}{blue!20}{pink!30}

\begin{tabular}{|l|c|c|}

\hline 

\textbf{Institutions (As on March 31, 2013) } & \textbf{Numbers } & \textbf{Balance Sheet Size }\tabularnewline

\hline 

Banks & 38 & 10.14 (Billion US\$)\tabularnewline

\hline 

Development Finance Institutions (DFIs) & 8 & 0.57 (Billion US\$)\tabularnewline

\hline 

Microfinance Institutions (MFIs) & 10 & 0.09 (Billion US\$)\tabularnewline

\hline 

Mutual Funds & 144 & .01 (Billion US\$)\tabularnewline

\hline 

Modaraba Companies & 21 & \multirow{8}{*}{0.09 (Billion US\$)}\tabularnewline

\cline{1-2} 

Asset Management Companies & 18 & \tabularnewline

\cline{1-2} 

Leasing Companies & 10 & \tabularnewline

\cline{1-2} 

Pension Funds & 23 & \tabularnewline

\cline{1-2} 

Investment Banks & 8 & \tabularnewline

\cline{1-2} 

Cooperative Banks + Venture Capital & 2 + 1 & \tabularnewline

\cline{1-2} 

Insurance Companies & 51 & \tabularnewline

\cline{1-2} 

Exchange Companies & 56 & \tabularnewline

\hline 

\end{tabular}

}
\end{frame}
\end{document}

答案1

\multirow值被行背景颜色覆盖。因此\multirow应放在最后一行并将文本放在上面(参数中的负行号\multirow):

\documentclass[xcolor=table]{beamer}

\usepackage{adjustbox}
\usepackage{array}
\usepackage{multirow}

\begin{document}


\begin{frame}{Financial Ind}
\centering

\adjustbox{max height=\dimexpr\textheight-5.5cm\relax,
           max width=\textwidth}{%
\rowcolors{1}{tableShade}{white}%
\rowcolors[]{2}{blue!20}{pink!30}%
\begin{tabular}{|l|c|c|}
\hline 
\textbf{Institutions (As on March 31, 2013) } & \textbf{Numbers } & \textbf{Balance Sheet Size }\tabularnewline
\hline 
Banks & 38 & 10.14 (Billion US\$)\tabularnewline
\hline 
Development Finance Institutions (DFIs) & 8 & 0.57 (Billion US\$)\tabularnewline
\hline 
Microfinance Institutions (MFIs) & 10 & 0.09 (Billion US\$)\tabularnewline
\hline 
Mutual Funds & 144 & .01 (Billion US\$)\tabularnewline
\hline 
Modaraba Companies & 21 & \tabularnewline
\cline{1-2} 
Asset Management Companies & 18 & \tabularnewline
\cline{1-2} 
Leasing Companies & 10 & \tabularnewline
\cline{1-2} 
Pension Funds & 23 & \tabularnewline
\cline{1-2} 
Investment Banks & 8 & \tabularnewline
\cline{1-2} 
Cooperative Banks + Venture Capital & 2 + 1 & \tabularnewline
\cline{1-2} 
Insurance Companies & 51 & \tabularnewline
\cline{1-2} 
Exchange Companies & 56 & \multirow{-8}{*}{0.09 (Billion US\$)}\tabularnewline
\hline 
\end{tabular}%
}
\end{frame}
\end{document}

结果

评论:

  • 的参数\adjustbox处于水平模式,因此行尾很重要,并在左右两侧添加空格。示例通过注释它们(放在%行尾)来删除它们。

相关内容