1

I found very useful links which was describing to create table. I stacked as I was trying to apply them into my case. I wrote the following code but could not split rows at the and.

\documentclass[11pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage{multirow}


\begin{document}
\begin{table}[h]
        \centering
        \begin{tabular}{|c| c| c|c| c| c|c| c|}
\hline
\multicolumn{6}{|c|}{A}&a&b\\
\hline
\multicolumn{6}{|c|}{A}&a&b\\
\hline
1&2&3&4&5&6&7&8\\
\hline
\multicolumn{6}{|c|}{A}&a&b\\
\hline
\multicolumn{3}{|c|}{A}&\multicolumn{3}{|c|}{A}&3&4\\
\hline
\multicolumn{3}{|c|}{A}&\multicolumn{3}{|c|}{A}&3&4\\
\hline
\multicolumn{6}{|c|}{A}&a&b\\
\hline
1&2&3&4&5&6&7&8\\
\hline
1&2&3&4&5&6&7&8\\
\hline
1&2&3&4&5&6&7&8\\
\hline
1&2&3&4&5&6&7&8\\
\hline
1&2&3&4&5&6&7&8\\
\hline
1&2&3&4&5&6&7&8\\
\hline
\multicolumn{6}{|c|}{A}&a&b\\
\hline
\multicolumn{2}{|c|}{\multirow{4}{*}{Problem1}}&\multicolumn{4}{|c|}{\multirow{4}{*}{Problem2}}&3&4\\
\multicolumn{2}{|c|}{\multirow{4}{*}{}}&\multicolumn{4}{|c|}{\multirow{4}{*}{}}&3&4
\end{tabular}
\end{table}
\end{document}

This code gives the output: enter image description here

and I need to add instead of the "Problem" stage the following table: enter image description here

Can you please give me a clue for putting here multi rows?

2
  • 2
    Welcome to TeX SX! How what you want connects to what you've already obtained is not very clear. Could you explain more, or post a hand-made sketch.
    – Bernard
    Jun 24, 2015 at 20:28
  • thanks for your advices @Bernard. Next time, I'll ask better! Jun 25, 2015 at 11:22

1 Answer 1

1

It is not clear to me, how cell designated with "problem" should like to be. If you like to each cell "Problem .. " put a table sketched below your main sketch, then you are in really trouble, if you like to have all vertical and horizontal lines :-(. Otherwise it is relatively simple to achieve to put small tabular into this cell.

If the structure of this cell is simpler, for example each has three columns, then they can be included in man table as follows:

\documentclass[11pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage{multirow}

\usepackage[active,floats,tightpage]{preview}
    \setlength\PreviewBorder{1em}

\begin{document}
\begin{table}[h]
        \centering
        \begin{tabular}{|c| c| c|c| c| c|c| c|}
\hline
\multicolumn{6}{|c|}{A}&a&b\\
\hline
\multicolumn{6}{|c|}{A}&a&b\\
\hline
1&2&3&4&5&6&7&8\\
\hline
\multicolumn{6}{|c|}{A}&a&b\\
\hline
\multicolumn{3}{|c|}{A}&\multicolumn{3}{|c|}{A}&3&4\\
\hline
\multicolumn{6}{|c|}{A}&a&b\\
\hline
1&2&3&4&5&6&7&8\\
\hline
\multicolumn{6}{|c|}{A}&a&b\\
\hline
\multirow{4}{*}{B}  & A  &   
            & \multirow{4}{*}{B} 
                & A &   & 3 & 4 \\  \cline{2-3}\cline{5-8}
    & 1 &   &   & 1 &   & 3 & 4 \\  \cline{2-3}\cline{5-8}
    & 2 &   &   & 2 &   & 3 & 4 \\  \cline{2-3}\cline{5-8}
    & 3 &   &   & 3 &   & 3 & 4 \\
\hline
\end{tabular}
    \end{table}
\end{document}

enter image description here

If this is not what you looking for, let me know.

1
  • Thank you very much @Zarko, your answer was exactly what I needed. Jun 25, 2015 at 11:23

You must log in to answer this question.

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