答案1
对我来说下表更合适:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{table}[ht]
\centering
\caption{Caption for the table}
\label{tab:table1}
\begin{tabular}{ l r }
\toprule
Corpus & Tokens \\ \midrule
a & b \\
d & e \\
f & g \\ \midrule
total & 193,001,930 \\ \bottomrule
\end{tabular}
\end{table}
\end{document}
附录:
如果您坚持使用带有规则的表,那么hhline
包可以在双重规则中设置规则之间的距离:
\setlength\doublerulesep{0.5pt}
这使:
上图的完整MWE为:
\documentclass{article}
\usepackage{hhline}
\begin{document}
\begin{table}[h!]
\centering
\setlength\doublerulesep{0.5pt}% <-- set distance between double rule
\caption{Caption for the table}
\label{tab:table1}
\begin{tabular}{ | l | r |}
\hline
Corpus & Tokens \\ \hhline{==}
a & b \\ \hline
d & e \\ \hline
f & g \\ \hhline{==}
total & 193,001,930 \\ \hline
\end{tabular}
\end{table}
\end{document}
附录(2):
如果您喜欢以下结果:
\hhline{==}
那么您只需要用和“\hhline{|--|}”\hhline{|==|}
替换即可。\hline
答案2
您可以创建一个具有所需高度的“假”行,multicolumn
整个表格长度仅在其外部边框处有垂直线:
\documentclass{article}
\usepackage{array}
\renewcommand*{\arraystretch}{1.3}%extra vertical spacing between rows
\begin{document}
\begin{table}[h!]
\centering
\caption{Caption for the table}\label{tab:table1}
\begin{tabular}{ | l | r |}
\hline
Corpus & Tokens \\ \hline
\multicolumn{2}{|c|}{} \\[-14pt]% adjust this value according to your needs
\hline
a & b \\ \hline
d & e \\ \hline
f & g \\ \hline
\multicolumn{2}{|c|}{} \\[-14pt]% adjust this value according to your needs
\hline
total & 193,001,930 \\ \hline
\end{tabular}
\end{table}
\end{document}
答案3
您可以使用\usepackage{hhline}
和\setlength{\doublerulesep}{2pt}
(双行空间定义)。
\documentclass{article}
\usepackage{hhline}
\setlength{\doublerulesep}{2pt}
\begin{document}
\begin{table}[h!]
\centering
\caption{Caption for the table}
\label{tab:table1}
\begin{tabular}{ | l | r |}
\hline
Corpus & Tokens \\ \hhline{|=|=|}
a & b \\ \hline
d & e \\ \hline
f & g \\ \hhline{|=|=|}
total & 193,001,930 \\ \hline
\end{tabular}
\end{table}
\end{document}
更新: 用 ...: 定义行距。
\setlength{\doublerulesep}{2pt}
(感谢@Bernard 的评论。)
Bernard:只需在序言中更改 \doublerulesep 的值:大多数标准类中的默认值是 \setlength{\doublerulesep}{2pt}。