2

When you put two \hline in a latex table it separates it in two different blocks. I want to make that, but in the vertical direction I have tried putting in the tabular options{|c||cccc|} but this doesn't work beause horizontal lines cross the entire table without leaving a blanck between the first and second column.

My table is as follows.

\begin{table}[]
    \centering
    \begin{tabular}{|c||ccccccccc|}
    \hline
         r,s & 0&1& 2&3&4&5&6&7&8 \\ \hline \hline
         0& 1&$\R\oplus \R$ & $\R(2)$ & $\C(2)$&$\H(2)$&$\H(2)\oplus\H(2)$&$\H(4)$&$\H(4)\oplus\H(4)$&$\R(16)$\\
         \hline
    \end{tabular}
    \caption{Caption}
    \label{tab:my_label}
\end{table}
  • use || and then use \hhline from the package of that name if you don't want the hlines to cross. – David Carlisle Feb 8 '17 at 22:40
  • Welcome to TeX SX! What are \R, \C, \H? – Bernard Feb 8 '17 at 22:43
  • @Bernard, I'm almost sure that it means \mathbb{R} and so on... very popular new commands for math papers.... lol – Sigur Feb 8 '17 at 22:54
  • \H is a very bad idea for that purpose because it is already defined, this could make bibliographies entertaining – Au101 Feb 8 '17 at 22:59
  • 1
    @Au101 -- for some definition of "entertaining". (in a production environment, "exasperating" is more often closer to the epithet used, while striving to remain polite.) – barbara beeton Feb 9 '17 at 2:17
3

enter image description here

\documentclass{article}

\usepackage{hhline}


\begin{document}

\begin{table}
    \centering
    \begin{tabular}{|c||ccccccccc|}
    \hhline{-||---------}
         r,s & 0&1& 2&3&4&5&6&7&8 \\ \hhline{=::=========}
         0& 1&$R\oplus R$ & $R(2)$ & $C(2)$&$H(2)$&
$H(2)\oplus
H(2)$&$H(4)$&$H(4)\oplus H(4)$&$R(16)$\\
           \hhline{-||---------}
    \end{tabular}
    \caption{Caption}
    \label{tab:my_label}
\end{table}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.