I'm trying to make one column in a table appear ragged right. I've had some success, depending (inexplicably, to me) on the number of columns. The following works for me:
Attempt 1
\documentclass{article}
\usepackage{graphicx}
\usepackage{dcolumn}
\begin{document}
\begin{tabular}{l>{\everypar{\raggedright}}p{7cm}l}
a & This is a test to see how paragraphs behave in this table & x \\
b & Here's another line of the table, just for the fun of it & y
\end{tabular}
\end{document}
Similarly, if I remove the first and third columns (leaving only the \raggedright column), then it still works.
However, I get errors and alignment problems when I remove the last column. In short, the following does not work:
Attempt 2
\documentclass{article}
\usepackage{graphicx}
\usepackage{dcolumn}
\begin{document}
\begin{tabular}{l>{\everypar{\raggedright}}p{7cm}}
a & This is a test to see how paragraphs behave in this table \\
b & Here's another line of the table, just for the fun of it
\end{tabular}
\end{document}
Can anyone explain why one works but the other doesn't? Also, I couldn't get either to work without the dcolumn package, which seems strange to me because that should be unrelated. Thanks for your help.

\centering, but why must I use\arraybackslashin my table? – Werner Oct 30 '13 at 02:02\everypar; in this case is not needed, as\raggedrightis a declaration that keeps its effect in the whole current group. – egreg Oct 30 '13 at 07:42