1

I am having trouble creating multicolumn table, which again has multicolumn. I want to again a two column under case even and odd and then again two columns. But I am not able to do this. I need something like this enter image description here But I am having a lot of trouble. If any one can help me on this. I will be very thankful. The code that so far I have is.

\begin{tabular}{|c|c|c|c|}
\hline
\multicolumn{2}{|c|}{$a > 0$} & \multicolumn{2}{c|}{$a < 0$}  \\
\cline{1-4}
 $n$ even & $n$ odd & $n$ even & $n$ odd  \\
\hline
  & & &  \\
  & & &  \\
 & & &  \\
\hline
 & & &  
\end{tabular}
1
  • Your table should have eight columns
    – egreg
    Commented Feb 7, 2016 at 20:57

1 Answer 1

2

Here is a solution: you need 8 columns, and an array environment, rather than tabular:

 \documentclass{article}
    \usepackage{mathtools}


\begin{document}

\[ \renewcommand\arraystretch{1.5}
\begin{array}{|*{8}{c|}}
\hline
\multicolumn{4}{|c|}{a > 0} & \multicolumn{4}{c|}{a < 0} \\
\hline
\multicolumn{2}{|c|}{n\enspace\text{even}} & \multicolumn{2}{c|}{n\enspace\text{odd}} & \multicolumn{2}{c|}{n\enspace\text{even}} & \multicolumn{2}{c|}{n\enspace\text{odd}} \\
\hline
-\infty & + \infty & -\infty & + \infty & -\infty & + \infty & -\infty & + \infty \\
  & & & & & & & \\
 & & & & & & & \\
\hline
\end{array}
 \]*
\end{document} 

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .