I have created a longtable by using information from the question asked here. Now I want to create a table with two columns with 3 rows each within the right part of this long table. A pictorial representation is here. I tried to do use itemize but it fails to compile. Is there a way to do it?
Asked
Active
Viewed 2,009 times
0
2 Answers
2
Just put the tabular into one of the cell, as said by David Carlisle: you can nest itemize or tabular inside a longtable cell in a p column.

Code
\documentclass{article}%[border=10pt]{standalone}
\usepackage[left=0.5cm,right=0.5cm,top=0.5cm,bottom=0.5cm]{geometry}
\usepackage{multirow,lipsum,longtable,colortbl,xcolor}
\usepackage{dcolumn}%,tabularx,tabulary}%,threeparttable,longtable,tabu}
%
\setlength{\arrayrulewidth}{.3em}
\begin{document}
%
\begin{longtable}{%
|>{\columncolor{gray}}p{\dimexpr0.3\textwidth-2\tabcolsep-2\arrayrulewidth\relax}
|p{\dimexpr0.7\textwidth -2\tabcolsep-\arrayrulewidth\relax}|} \hline
\multicolumn{1}{|c|}{{\cellcolor{gray}} A column} &\multicolumn{1}{c|}{B column}\\ \hline
\lipsum[2] & \lipsum[3] \\
\lipsum[2] &
{\setlength{\arrayrulewidth}{.1em}
\begin{tabular}{|m{0.3\textwidth}|m{0.3\textwidth}|}\hline
A & B \\ \hline
A & B \\ \hline
A & B \\ \hline
\end{tabular}} \\
\lipsum[2] & \lipsum[3] \\
\hline
\end{longtable}
\end{document}
Jesse
- 29,686
-
-
David -- You are Guru, I know that for sure. Still need to learn from you. Sir. – Jesse Mar 13 '14 at 15:29
pcolumn, so if it didn't compile you made an error that is impossible to guess. – David Carlisle Mar 13 '14 at 13:49