Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When I use following MWE for getting itemized text in two columns, the item in the list sometimes take a "justified" formatting and thus there is significant space in between two words. This produces a poor looking two column list. How can I make them align to the left, thus improving the look?

\documentclass{article}
   \usepackage{etoolbox}
    \AtBeginEnvironment{itemize}{\begin{multicols}{2}}    %%% 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}
share|improve this question

2 Answers 2

up vote 3 down vote accepted

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}

enter image description here

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}

enter image description here

Main advantage of \RaggedRight is that it allows hyphenation while maintaining ragged rightedness.

Choice is yours.

share|improve this answer
    
@Mico Good suggestion. I thought giving both results would make it clear. I have added a sentence any way. Thanks. –  Harish Kumar Feb 3 at 14:19

Don't redefine itemize: you'll lose it and it's better not to.

Just use \raggedright:

\documentclass{article}
\usepackage{multicol}

\newenvironment{twoitemize}
 {\begin{multicols}{2}\raggedright\begin{itemize}}
 {\end{itemize}\end{multicols}}

\begin{document}
\begin{twoitemize}
\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{twoitemize}
\end{document}

Or \RaggedRight from ragged2e as suggested in another answer. But, for your own sake, don't redefine itemize.

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.