You can use \raggedright
:
\AtBeginEnvironment{itemize}{\begin{multicols}{2}\raggedright}
\raggedright
is local within the multi columns.
Full code:
\documentclass{article}
\usepackage{etoolbox}
\AtBeginEnvironment{itemize}{\begin{multicols}{2}\raggedright} %%% this line
\AtEndEnvironment{itemize}{\end{multicols}} %%% and this one
\usepackage{multicol}
\begin{document}
\begin{itemize}
\item my first item
\item my second item
\item my third item in itemized environment
\item my forth
\item 5
\item 6
\item 7
\item 8
\item 9
\item 10
\item 11
\item 12
\item 13
\end{itemize}
\end{document}
Going one step further, you may put \usepackage{ragged2e}
in the preamble and use \RaggedRight
instead to get:
\documentclass{article}
\usepackage{ragged2e}
\usepackage{etoolbox}
\AtBeginEnvironment{itemize}{\begin{multicols}{2}\RaggedRight} %%% this line
\AtEndEnvironment{itemize}{\end{multicols}} %%% and this one
\usepackage{multicol}
\begin{document}
\begin{itemize}
\item my first item
\item my second item
\item my third item in itemized environment
\item my forth
\item 5
\item 6
\item 7
\item 8
\item 9
\item 10
\item 11
\item 12
\item 13
\end{itemize}
\end{document}
Main advantage of \RaggedRight
is that it allows hyphenation while maintaining ragged rightedness.
Choice is yours.
TeX provides a \rightarrowfill
command that does just this. It's a standard part of plain TeX and LaTeX.
\documentclass{article}
\newcommand{\abox}[2]{\makebox[#1][l]{#2 \rightarrowfill}}
\begin{document}
\begin{itemize}
\item \abox{1in}{Item 1} Explanation 1
\item \abox{1in}{Item 2} Explanation 2
\item \abox{1in}{Item 3} Explanation 3
\item \abox{1in}{Last item} Last explanation
\end{itemize}
\end{document}
If you want "nicer" arrows, just add \usepackage{mathabx}
or otherwise redefine \rightarrow
to your favourite arrow symbol. This works because \rightarrrowfill
uses the current definition of \rightarrow
.
There's also a corresponding \leftarrowfill
command.
You can define the command using plain TeX facilities as well, if you wanted to use it without LaTeX:
\def\abox#1#2{\leavevmode\hbox to #1{#2\ \rightarrowfill}}
An alternative approach, that might work better if you have long explanations, would be to make a new list environment that used \rightarrowfill
. For example
\documentclass{article}
\usepackage{mathabx}
\usepackage{calc} % needed to use + in \setlength
\newenvironment{arrowlist}[1][1in]%
{\begin{list}{}{%
\renewcommand{\makelabel}[1]{\indent\textbullet\ \textit{##1}\ \rightarrowfill}%
\setlength{\labelwidth}{#1}%
\setlength{\leftmargin}{\labelwidth+\labelsep}%
}}
{\end{list}}
\begin{document}
\begin{arrowlist}
\item[First thing] Explanation 1
\item[Second one] Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
Curabitur dictum gravida mauris.
\end{arrowlist}
Or to make the labels longer than 1in...
\begin{arrowlist}[1.4in]
\item[First thing] Explanation 1
\item[Second one] Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
\end{arrowlist}
\end{document}
Best Answer
This is a solution using the
enumitem
package instead ofparalist
. Itswide
option is made for that: