0

Concretely, this is what I want to do as described in this picture. Create two columns, one of larger width and spanning the whole page. I understand there is multicolumn but I can't seem to make it use.

  • Does this table span multiple pages? – user11232 Mar 13 '14 at 7:02
  • @HarishKumar, Yes, it does. – user1343318 Mar 13 '14 at 8:04
2

This is one possible suggestion where longtable package is used. The varying length of each column 0.3\textwidth and 0.7\textwidth can be changed, but must they be added up to 1\textwidth.

Edit: To color the left column, colortbl and xcolor are used with \columncolor{gray} and \cellcolor{gray} commands.

enter image description here 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}
%
\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] & \lipsum[3] \\
\lipsum[2] & \lipsum[3] \\
\lipsum[2] & \lipsum[3] \\
\hline
\end{longtable}

\end{document}

enter image description here 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{lipsum,longtable,dcolumn}

\setlength{\arrayrulewidth}{.3em}
\begin{document}

\begin{longtable}{%
|p{\dimexpr0.3\textwidth-2\tabcolsep-2\arrayrulewidth\relax}
|p{\dimexpr0.7\textwidth-2\tabcolsep-\arrayrulewidth\relax}|} \hline
\multicolumn{1}{|c|}{A column} & \multicolumn{1}{c|}{B column}\\ \hline
\lipsum[2] & \lipsum[3] \\
\lipsum[2] & \lipsum[3] \\
\lipsum[2] & \lipsum[3] \\
\lipsum[2] & \lipsum[3] \\
\hline
\end{longtable}


\end{document}
  • @Jesse thank you. One last question, is there a way, I can color the left column gray? – user1343318 Mar 13 '14 at 10:04
  • @Jesse thank you. One last question, is there a way, I can color the left column gray? – user1343318 Mar 13 '14 at 10:05
  • @user1343318 -- Please see my update. – Jesse Mar 13 '14 at 10:48
  • @DavidCarlisle -- Thank you sir. Noted and corrected accordingly. – Jesse Mar 13 '14 at 10:59

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.