# Tabular and itemize

I'm having a big problem...I am trying to make a nice table which in the left side has just text and in the right part it may contain some itemized elements. This is how i'm doing it:

\documentclass[a4paper,12pt]{report}
...
\begin{tabular}{r| p{5cm}}
{\bf Text} &
Data \\ \hline
{\bf Itemization} &
\begin{itemize}
\item{item1}
\item{item2}
\end{tabular}
\\ \hline
\end{tabular}


But like this the \hline will be 5cm long. Is there a way of making it as long as the top bar (the one who comes from \documentclass{report})?

• Welcome to TeX.SX! Which \hline is too short? – jjdb Apr 15 '13 at 20:12
• I think the answer(s) in Know the cell width with tabular* or include a paragraph box without specifying its width would help. The suggestion, use the tabularx package, which provides the tabularx environment: \noindent\begin{tabularx}{\linewidth}{rX} ... \end{tabularx} – Werner Apr 15 '13 at 20:16
• @jjdb: Eheh, i almost forgot, I'm new here =) hi everybody :P regarding you question...all of them. I guess they are all "bound" to the p{5cm}...i would like to make it as long as possible (without going out of the margins ofcourse). Werner: thanks! I'm kinda new to Tex-World, and any suggestion is welcome =) – n0n4m3 Apr 15 '13 at 20:30

Please always provide complete documents showing packages used (the report class doesn't use a ruled headline by default for example). Also \bf shouldn't be used unless you are aiming fro LaTeX2.09 compatibility.

You just need to make the table full width using tabular* for example:

\documentclass[a4paper,12pt]{report}
\usepackage{array}
\setlength\extrarowheight{2pt}
\begin{document}

\hrule

\bigskip

xx x x x x

\bigskip

\noindent
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}r| p{5cm}@{}}
\textbf{Text} &
Data \\ \hline
\textbf{Itemization} &
\mbox{}\par\vspace{\dimexpr-\baselineskip-\topsep-\partopsep\relax}
\begin{itemize}
\item item1
\item item2
\end{itemize}
\par\vspace{\dimexpr-\baselineskip-\topsep-\partopsep\relax}
\mbox{}\\ \hline
\end{tabular*}

\end{document}

• Here you are the packages used: \documentclass[a4paper,12pt]{report} \usepackage[english]{babel} \usepackage[latin1]{inputenc} \usepackage[pdftex]{graphicx} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{float} \usepackage[small]{caption} \usepackage{color} \usepackage{fancyhdr} \pagestyle{fancy} \lhead{} \chead{} \rhead{} \lfoot{} \cfoot{\thepage} \addtolength{\oddsidemargin}{+1,3cm} \addtolength{\evensidemargin}{-1,3cm} \renewcommand{\familydefault}{\sfdefault} \begin{document} And here's the result of your code:link – n0n4m3 Apr 15 '13 at 20:54