Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Pipe line in table.

  1. Feb 3, 2010 #1
    Dear all,
    I want to make a vertical line in table..
    I use this following latex codes
    Code (Text):

    \begin{table}[h]
    \caption{Some caption.}\label{namelab}
    \vspace{2mm}
    \centering
    \begin{tabular}[width=1\textwidth]{ll|cccc}
    \hline\hline
    \multicolumn{2}{c}{2~col} & par~1 & par~2 & par~3 & par~4\\
    \hline
    1 & at RT                 & 56   & d1    & 0.25 & 0.3\\
      & 4.2~K                 & 59   & d2    & 0.25 & 0.2\\
    \hline\hline
    \end{tabular}
    \end{table}
     
    When i compiled it i got a good table..but the vertical line is not continuous..please see the figure attached..no line after '2 col'.
    Thanks for your help
     

    Attached Files:

  2. jcsd
  3. Feb 4, 2010 #2

    Hepth

    User Avatar
    Gold Member

    yeah i dont think it works well, you can fix it by adding another column, empty:

    Code (Text):
    \begin{table}[h]
    \caption{Some caption.}\label{namelab}
    \vspace{2mm}
    \centering
    \begin{tabular}[width=1\textwidth]{lll|cccc}
    \hline\hline
    \multicolumn{2}{c}{2~col}&& par~1 & par~2 & par~3 & par~4\\
    \hline
    1 & at RT               && 56   & d1    & 0.25 & 0.3\\
      & 4.2~K               && 59   & d2    & 0.25 & 0.2\\
    \hline\hline
    \end{tabular}
    \end{table}
     
  4. Feb 5, 2010 #3
    oh..thanks..
    simple trick!
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook