Making Vertical Lines in Table - Latex

  • Context: LaTeX 
  • Thread starter Thread starter Rajini
  • Start date Start date
  • Tags Tags
    Line Pipe Table
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 4K views
Rajini
Messages
619
Reaction score
4
Dear all,
I want to make a vertical line in table..
I use this following latex codes
Code:
\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
 

Attachments

on Phys.org
yeah i don't think it works well, you can fix it by adding another column, empty:

Code:
\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}
 
oh..thanks..
simple trick!