# Paragraph line break alignment in table

I'm doing the following:

\begin{tabular}{
p{0.20\textwidth}
p{0.20\textwidth}
p{0.20\textwidth}
p{0.20\textwidth}
}

2009 &
2010 &
2011 &
2012 \\

\hline

Menores custos &
Menores custos &

\end{tabular}


And getting the following:

How can I get rid of these big spaces and turn them into into 'normal' spaces, giving a better perspective of left alignment putting the words "Liberdade" and "de" together?

I need to keep these 0.2\textwidth column widths.

-

Narrow columns are hard to handle; in these cases, one possible alternative is to use use \raggedright columns:

\documentclass{article}
\usepackage{array}

\begin{document}

\begin{tabular}{
>{\raggedright\arraybackslash}p{0.20\textwidth}
>{\raggedright\arraybackslash}p{0.20\textwidth}
>{\raggedright\arraybackslash}p{0.20\textwidth}
>{\raggedright\arraybackslash}p{0.20\textwidth}
}

2009 &
2010 &
2011 &
2012 \\

\hline

Menores custos &
Menores custos &
\end{tabular}

\end{document}


As egreg mentions in his comment, using \RaggedRight from the ragged2e package can be a better option, since now hyphenation is allowed and it outputs less ragged columns:

\documentclass{article}
\usepackage{ragged2e}
\usepackage{array}

\begin{document}

\begin{tabular}{
>{\RaggedRight\arraybackslash}p{0.20\textwidth}
>{\RaggedRight\arraybackslash}p{0.20\textwidth}
>{\RaggedRight\arraybackslash}p{0.20\textwidth}
>{\RaggedRight\arraybackslash}p{0.20\textwidth}
}

2009 &
2010 &
2011 &
2012 \\

\hline

Menores custos &
Menores custos &
\end{tabular}

\end{document}

-
Also \RaggedRight from ragged2e that allows hyphenation and outputs less ragged columns. –  egreg Nov 3 '12 at 16:08
@egreg: yes; I've added this option to my answer. –  Gonzalo Medina Nov 3 '12 at 16:17

You can use raggedright inside p columns.

\documentclass{standalone}
\begin{document}
\begin{tabular}{
p{0.20\textwidth}
p{0.20\textwidth}
p{0.20\textwidth}
p{0.20\textwidth}
}

2009 &
2010 &
2011 &
2012 \\

\hline

Menores custos &
Menores custos &

beware the \\  there is a forced raggedright line break, not an end of table row. As it's the end of the table anyway, safest is simply not to use \\ . –  David Carlisle Nov 3 '12 at 16:07
@DavidCarlisle: Uh!. Remnant of OP's code. Didn't notice at all. Thank you. Corrected now. :-) –  Harish Kumar Nov 3 '12 at 16:22