0

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?

  • 2
    Please always post a complete (small) document that shows the problem. You can nest itemize or tabular inside a longtable cell in a p column, so if it didn't compile you made an error that is impossible to guess. – David Carlisle Mar 13 '14 at 13:49
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.

enter image description here

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}
  • are there any of my packages you are not using there:-) – David Carlisle Mar 13 '14 at 15:21
  • David -- You are Guru, I know that for sure. Still need to learn from you. Sir. – Jesse Mar 13 '14 at 15:29
0

As you have not posted any code I cannot help in detail, but it feel like you are looking for the \multirow command. See 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.