I'm not sure that I would necessarily put itemize
environments inside a table, but with the enumitem
package, it's easy to control the list spacing. I've also created a column type that sets the text without justification, which is a better for narrow columns like you have, and centred the column headings using \multicolumn{1}{c}{...}
for each column.
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[german]{babel}
\usepackage{array}
\usepackage{lscape}
\usepackage{booktabs}
\usepackage{enumitem} % for control of list spaceing
% This creates a column type with no text justification
\newcolumntype{R}[1]{>{\raggedright\arraybackslash}p{#1}}
\begin{document}
\begin{landscape}
\begin{tabular}{R{4cm}R{4cm}R{4cm}R{4cm}} %<--- damit geht es jetzt auch ;)
\toprule
% centre headings using \multicolum{1}{c}{...} for each column
\multicolumn{1}{c}{Cluster 1} & \multicolumn{1}{c}{Cluster 2} & \multicolumn{1}{c}
\midrule
\begin{itemize}[nolistsep,leftmargin=*]
\item Canada, France, Germany
\item Austria, Belgium, Netherlands, Switzerland
\item Finland, Iceland, Norway, Sweden
\item Greece, Portugal, Spain
\item New Zealand
\end{itemize}
&
\begin{itemize}[nolistsep,leftmargin=*]
\item Italy, Japan, United Kingdom, United States
\item Denmark, Ireland
\item Estonia, Hungary
\end{itemize}
&
\begin{itemize}[nolistsep,leftmargin=*]
\item Luxembourg
\item Czech Republic, Slovenia
\item Australia, Korea, Turkey
\end{itemize}
&
\begin{itemize}[nolistsep,leftmargin=*]
\item Poland, Slovak Republic
\item Israel
\end{itemize}
\\
\bottomrule
\end{tabular}
\end{landscape}
\end{document}
The following code repackages the columns as set by multicols, centre aligning the middle columns and aligning the right hand column flush right. It works for paragraphs as well as single lines, but would fail if there is any extra inter-line material (such as floats or specials).
\documentclass{article}
\textheight.3\textheight
\pdfpageheight2\textheight
\usepackage{multicol}
\makeatletter
\def\maybe@reverse@columns{%
\count@\mult@rightbox
\rejustifybox{\hskip 0pt \@plus 1filll\unhbox\z@\unskip}%
\advance\count@4
\rejustifybox{\hskip 0pt \@plus 1filll\unhbox\z@\unskip\hskip 0pt \@plus 1filll}%
}
\def\rejustifybox#1{%
\@tempdimb\ht\count@
\global\setbox\@ne\vbox{}%
\setbox\z@\vbox{\hbox{\vrule depth 123sp} \unvbox\count@
\loop
\setbox\z@\lastbox
\@tempskipa\lastskip\unskip
\@tempcnta\lastpenalty\unpenalty
\ifdim\dp\z@=123sp
\else
\global\setbox\@ne\vbox{%
\penalty\@tempcnta
\vskip\@tempskipa
\ifvoid\z@\else
\hbox to \wd\z@{#1}%
\fi
\unvbox\@ne}%
\repeat
\global\setbox\count@\box\@ne
\global\ht\count@\@tempdimb
}}
\makeatother
\def\a{One two three four five six seven. }
\def\b{\a Red green blue yellow. }
\def\c{\a\b\a\b}
\def\x{Oxford\par London\par Manchester\par Birmingham\par Nottingham\par Liverpool\par Cambridge\par}
\begin{document}
\begin{multicols}{3}\raggedright
1\c\c\par
2 Text goes here. \c\a\c\par
3 \x\x\x\x\x\x\x\x\x
\end{multicols}
\end{document}
Best Answer
You can do something like this:
but I don't see much use in this. Some other approaches (e.g., boxes or
tabular
orlongtable
) without thetabbing
would do the same.