3

Hi what I'm trying to do is getting an "empty" column on a table.

Having an empty row is easy by adding a \hline twice. Like here:

\documentclass[12pt]{article}

\begin{document}

\begin{tabular}{|c|c|c|c|}  
\hline 
 & headline1 & headline2 & headline3 \\ 
\hline 
\hline % <-- extra one giving my an "empty" row
row1 & a & b & c \\ 
\hline 
row2 & d & e & f \\ 
\hline 
row3 & g & h & i \\ 
\hline 
\end{tabular} 

\end{document}

Is there a way of having the same on a column ? E.g. between "row1" and "a".

I tried to ad an additional | on the definition (\begin{tabular}{|c||c|c|c|}), but the horizontal lines are displayed (due to \hline causes a line on the whole width of the table)

\documentclass[12pt]{article}

\begin{document}

\begin{tabular}{|c||c|c|c|}  %<-- change here
\hline 
 & headline1 & headline2 & headline3 \\ 
\hline 
\hline 
row1 & a & b & c \\ 
\hline 
row2 & d & e & f \\ 
\hline 
row3 & g & h & i \\ 
\hline 
\end{tabular} 

\end{document}

What I want to have is this output, but without the red circled borders (I want to have it like the green one):

[1]: https://i.stack.imgur.com/U5A

This is how the column should appear:

enter image description here

  • @TeXnician thx I figures this out to late. its still causing an issue. see the amended questions :) – user1234 Jun 5 '17 at 10:42
  • What's the desired output? – TeXnician Jun 5 '17 at 10:44
  • like on the last screenshot but without the "closing" horizontal lines/borders. Like between "row0" and "row1" there are no vertial lines/borders – user1234 Jun 5 '17 at 10:46
  • just added it ;) – user1234 Jun 5 '17 at 10:49
  • 1
    package hhline? but better is not have vertical lines at all :) – Zarko Jun 5 '17 at 11:10
3

You can use the hhline package.

\documentclass[12pt]{article}
\usepackage{hhline}
\begin{document}
\begin{tabular}{|c||c|c|c|}  %<-- change here
  \hhline{-||---}
  & headline1 & headline2 & headline3 \\ 
  \hhline{=::===}
  row1 & a & b & c \\ 
  \hhline{-||---}
  row2 & d & e & f \\ 
  \hhline{-||---}
  row3 & g & h & i \\ 
  \hhline{-||---}
\end{tabular} 
\end{document}

enter image description here

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.