我正在尝试在 Beamer 中创建一个简单的表格。我的代码是
\documentclass[11pt]{beamer}
\usepackage[english,greek]{babel}
\usepackage[iso-8859-7]{inputenc}
\usepackage{kerkis}
\usetheme{Air}
\usepackage{thumbpdf}
\usepackage{wasysym}
\usepackage{ucs}
%\usepackage[utf8]{inputenc}
\usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}
\usepackage{verbatim}
\usepackage{tikz}
\usepackage{pifont}
\usepackage{tabularx}
\usepackage{multicol}
\usepackage{multirow}
\definecolor{Darkgreen}{rgb}{0,0.4,0}
\newcommand*\diff{\mathop{}\!\!\mathrm{d}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
%\usepackage[table]{xcolor}
\newcommand{\eng}[1]{\latintext#1\greektext}
\newcommand{\gr}[1]{\selectlanguage{greek}#1\selectlanguage{english}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\title{\eng{Analyze this}}
\subtitle{\eng{Pitfalls, Analysis, Results}}
\author{Αθανάσιος Σταματόπουλος}
%\date{September 6th 2006}
\begin{document}
\begin{frame}
\frametitle{\eng{Benchmarking Results for $^{nat}B$@$170^\circ$}}
\begin{table}[h]
\begin{tabular}{|c|c|c|c|c|}
\hline\\
\multirow{2}{*}{\eng{Energy}} & \eng{Chiari 10} & \eng{Chiari 10} & \eng{Chiari 10} & \eng{Chiari 10}\\
& \eng{Chiari 11} & \eng{Mayer($165^\circ$) 11} & \eng{Chiari($165^\circ$) 11} & \eng{Rihet 11}\\
\hline\\
$1500$ & $-17.13$ & $-$ & $-$ & $-$\\
\hline\\
$2250$ & $-16.98$ & $-4.74$ & $-18.70$ & $-$\\
\hline\\
$2800$ & $+2.15$ & $-$ & $-$ & $-$\\
\hline\\
$3300$ & $-17.17$ & $-$ & $-$ & $-18.65$\\
\hline
\end{tabular}
\end{table}
\end{frame}
\end{document}
我的输出如下
为什么没有填满所有的线条?如何修复这个问题?
答案1
只需删除后面的换行符即可\hline
\documentclass{beamer}
\usepackage{booktabs}
\begin{document}
\begin{frame}
\begin{table}
\begin{tabular}{|c|c|c|c|c|}
\hline
$2800$ & $+2.15$ & $-$ & $-$ & $-$\\
\hline
$3300$ & $-17.17$ & $-$ & $-$ & $-18.65$\\
\hline
\end{tabular}
\end{table}
\end{frame}
\end{document}