[Tex/LaTex] How to create a table with double line column

linetablesxetex

I want to create following table :

enter image description here

but I don't know how to achieve those double lines. I tried things like following:

\begin{table}[h!]
  \centering
  \caption{Caption for the table}
  \label{tab:table1}
  \begin{tabular}{ | l | r |}
  \hline
    Corpus & Tokens \\ \hline \hline
    a & b \\ \hline
    d & e \\ \hline
    f & g \\ \hline \hline
    total & 193,001,930 \\ \hline 
  \end{tabular}
\end{table}

enter image description here

Best Answer

to my taste the the following table is more nice:

enter image description here

\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}

Addendum:

If you persist to have table with rules, than hhline package enable setting distance between rules in double rule:

\setlength\doublerulesep{0.5pt}

which gives:

enter image description here

Complete MWE of above figure is:

\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}

Addedendum (2):

In case, that you liked the following result:

enter image description here

than you need only to replace \hhline{==} with \hhline{|==|} and \hline with `\hhline{|--|}.

Related Question