6

I need to itemize a text but at the same time to put in columns the text without the use of spaces.

Example of what I need:

\begin{itemize}   
\item   blabla  & blabla   
\item   blabla  & blabla  
\end{itemize}

4 Answers4

5

A solution with tabularx and the definition of a new column type (I), mimicking the \item command. If you want to break it across pages, load the ltablex packages which brings the facilities of longtable to tabularx.Demo with a ‘true’ itemize environment for comparing:

\documentclass[ a4paper, leqno]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage{array, ltablex}
\usepackage{enumitem}%
\usepackage{makecell, etoolbox}
\setcellgapes{\itemsep}
\AtBeginEnvironment{tabularx}{\setcellgapes[b]{\itemsep}\makegapedcells}
\AtEndEnvironment{tabularx}{\vskip\dimexpr-\itemsep-\topsep\relax}
\newcolumntype{I}{@{\hskip\leftmargin} >{\llap{\textbullet\hskip\labelsep}}X}

\begin{document}

Some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text.

\begin{itemize}
  \item A first item,
  \item Another item,
  \item A last item.
\end{itemize}

Some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text%

\begin{tabularx}{\linewidth}{IX}%
  A first item in left column & A first item in right column. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah \\
  A second item in left column Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah & A second item in right column
\end{tabularx}
Some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text%

\end{document}

enter image description here

Bernard
  • 271,350
  • And if I want to chose the item? For instance

    \item[(1)] \item[(iii)]

    etc..

    – Andrea Leo May 22 '15 at 12:17
  • Then it is no more an itemize environment you want to emulate, but an enumerate. It also can be automatised. You have to do domething along these lines: create a new counter and, instead of inserting a bullet via >{…} in the table preamble, insert a \refstepcounter{…}\llap{\arabic{…}\hskip\labelsep, and finally reset the counter to $0$ at the end of the environment. I can show you later if you wish. – Bernard May 22 '15 at 12:49
3

Another method would be to use a parbox

\documentclass{article}
\begin{document}
\begin{itemize}
\item \parbox{2cm}{ blabla} \parbox{2cm}{ blabla sgdjgfdjfgjdjf} \parbox{2cm}{ blabla}
\item \parbox{2cm} {blabla} \parbox{2cm}{blabla} \parbox{2cm}{ blabla}
\end{itemize}
\end{document}

Here even if the text exceeds the 2cm it would flow to the next line. Use [t] option with parbox to top align text.

1

You can try to use a table (adjust the width of the column):

\documentclass[12pt,a4paper]{scrartcl}
\begin{document}
\begin{itemize}
\item \begin{tabular}{p{4cm}p{4cm}} blabla & blabla \end{tabular}
\item \begin{tabular}{p{4cm}p{4cm}} blabla & blabla \end{tabular}
\end{itemize}
\end{document}
ulead86
  • 511
  • 1
  • 3
  • 13
1

Here is an option that allows for an itemize feel with page breaks:

enter image description here

\documentclass{article}
\usepackage{paracol,changepage,lipsum}
\newcommand{\insertbullet}{%
  \makebox[0pt][r]{\makebox[1em][l]{\textbullet}}}
\newenvironment{arrayitemize}
  {\par\vspace{\topsep}% Insert gap
   \newcommand{\litem}{% Left \item
     \noindent\insertbullet
     \renewcommand{\litem}{\switchcolumn*%
       \noindent\insertbullet}}
   \newcommand{\ritem}{\switchcolumn\noindent}% Right \item
   \begin{adjustwidth}{1em}{0pt}% Adjust margins
   \begin{paracol}{2}
   \ignorespaces}
  {\end{paracol}
   \end{adjustwidth}
   \vspace{\topsep}%
   \ignorespacesafterend}
\begin{document}

\lipsum[1]

\begin{arrayitemize}
  \raggedright% Just for this example
  \litem 
  A first item in left column 

  \ritem first item in right column. \lipsum[2]

  \litem
  A second item in left column \lipsum[2]

  \ritem
  A second item in right column

\end{arrayitemize}

\lipsum[1]
\end{document}

adjustwidth (from changepage) provides the indentation and therefore list-like feel, while paracol provides the tabular-like columnar breakout.

Werner
  • 603,163