What is the simplest way to create a tabularized column like this? 
Asked
Active
Viewed 187 times
3
-
Please clarify what you mean by "dynamic capacity". E.g., do you mean automatic line breaking if cell contents threaten to exceed a given width? – Mico Sep 02 '20 at 04:38
-
1Maybe "dynamically" is confusing or misleading. I want the width to remain same and equal. By dynamic, I meant the box sizes automatically adjust to the content , which might be a default setting. – Pramathesh Nandan Sep 02 '20 at 04:47
-
1Yeah, exactly what you assumed. Yes. Line breaking if width exceeded. – Pramathesh Nandan Sep 02 '20 at 04:48
1 Answers
5
I think you may want to look into using LaTeX's p column type. It (a) lets you specify a maximal usable width (6cm in the example shown below), (b) makes LaTeX insert line breaks automatically if the cell contents exceed the usable width, and (c) fully justifies each cell's contents (just like TeX does with a normal paragraph). Use \multicolumn{1}{...}{...} statements to override the p column type on an as-needed basis (say, for the header cells).
\documentclass{article}
\usepackage{array} % for "\extrarowheight" length variable
\setlength\extrarowheight{2pt} % optional
\begin{document}
\begin{tabular}{|p{6cm}|p{6cm}|}
\hline
\multicolumn{1}{|c|}{Prokaryotic Cells} &
\multicolumn{1}{c|}{Eukaryotic Cells} \\
\hline
Very minute in size & Fairly large in size \\
\hline
Nuclear region (nucleoid) not surrounded by a nuclear membrane &
Nuclear region surrounded by a nuclear membrane\\
\hline
\dots & \dots \\
\hline
\end{tabular}
\end{document}
Mico
- 506,678
