1

Any advise on this would be appreciated. I have to use a template to write up my paper but I cannot use \cline to merge cells in a table. A simple code is below:

\documentclass{cta-author}%%%%where cta-author is the template name

\begin{document}

\begin{tabular}{|c|c|c|c|c|}
\hline
\multirow{2}{*}{A $\wedge$ B}  & \multicolumn{4}{c|}{B}  \\
\cline{2-5}
     & \textbf{P} & \textbf{O} & \textbf{X} & \textbf{N} \\
\hline
\end{tabular}

\end{document}

The template can be found here: https://github.com/jubaitca/latex

2

try the following:

\documentclass{cta-author}%%%%where cta-author is the template name
\usepackage{hhline,multirow}     % <---

\begin{document}

{
\setlength\extrarowheight{2pt} % <--- (for better looking table
\begin{tabular}{|c|c| c|c|c|}
\hhline{|-----|}               % <--- (instead of \hline
\multirow{2}{*}{A $\wedge$ B}  & \multicolumn{4}{c|}{B}  \\
\hhline{|~|----|}              % <--- (instead of \cline
     & \textbf{P} & \textbf{O} & \textbf{X} & \textbf{N} \\
\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.