是否可以创建这个表格,第 a4 页?
\begin{tabular}{r|lllll|}
\cline{2-6}
\multicolumn{1}{l|}{} >& \multicolumn{1}{c}{\textbf{2000}} & \multicolumn{1}{c}{\textbf{2005}} & \multicolumn{1}{c}{\textbf{2007}} & \multicolumn{1}{c}{\textbf{2010}} & \multicolumn{1}{c|}{\textbf{2012}} \\ \hline
\multicolumn{1}{|r|}{\textbf{Global Electricity Consumption (Million MWh)}} & 1 & 6 & 7 & 12 & 13 \\ \hline
\multicolumn{1}{|r|}{\textbf{Global Data Center Electricity Use (Million MWh)}} & 2 & 5 & 8 & 11 & 14 \\ \hline
\multicolumn{1}{|r|}{\textbf{Data Center as Fraction of Global Electricity Consumption}} & 3\% & 4\% & 9\% & 10\% & 15\% \\ \hline
\end{tabular}
答案1
最接近您想要获得的东西:
梅威瑟:
\documentclass{article}
\usepackage{array,mdwtab,hhline}
\newcolumntype{R}[1]{>{\raggedleft\bfseries}m{#1}}
\begin{document}
\begin{tabular}{!{\vline[1pt]}R{44ex}||c|c| c|c| c !{\vline[1pt]}}
\cline[1pt]{2-6}
\multicolumn{1}{c||}{}
& \textbf{2000} & \textbf{2005} & \textbf{2007}
& \textbf{2010} & \textbf{2012} \\ \hhline{=::=====}
Global Electricity Consumption (Million MWh)
& 1 & 6 & 7 & 12 & 13 \\ \hhline{-||-----}
Global Data Center Electricity Use (Million MWh)
& 2 & 5 & 8 & 11 & 14 \\ \hhline{-||-----}
Data Center as Fraction of Global Electricity Consumption
& 3\% & 4\% & 9\% & 10\% & 15\% \\ \hhline{-||-----}
\hlx[1pt]{h}
\end{tabular}
\end{document}
正如您所看到的,在上面的 MWE 中,我使用了hhline
双线包(我个人不会使用它们,也不是所有的垂直线)和旧的包mdwtab
(与不兼容colortbl
)。
另一种方法是,根据我的口味,您可以通过使用booktabs
和tabularx
包获得更专业的外观:
\documentclass{article}
\usepackage{booktabs,tabularx}
\renewcommand\tabularxcolumn[1]{m{#1}}
\newcolumntype{R}{>{\raggedleft\arraybackslash\bfseries}X}
\begin{document}
\begin{tabularx}{\textwidth}{@{}R cc cc c}
\cmidrule[1pt]{2-6}
& \textbf{2000} & \textbf{2005} & \textbf{2007}
& \textbf{2010} & \textbf{2012} \\ \midrule
Global Electricity Consumption (Million MWh)
& 1 & 6 & 7 & 12 & 13 \\ %\hhline{-||-----}
Global Data Center Electricity Use (Million MWh)
& 2 & 5 & 8 & 11 & 14 \\ %\hhline{-||-----}
Data Center as Fraction of Global Electricity Consumption
& 3\% & 4\% & 9\% & 10\% & 15\% \\ %\hhline{-||-----}
\bottomrule[1pt]
\end{tabularx}
\end{document}