I am trying to format a "paragraph" table column using \raggedright. However, it generates an error "\midrule ->\noalign". Thanks for any help:
% Test.tex
%--------------
\documentclass{article}
\usepackage{calc}
\usepackage{array}
\usepackage{booktabs}
%\usepackage[document]{ragged2e} % Has no effect
\begin{document}
% This works:
\begin{tabular}{>{\centering}p{\widthof{Symbolic}}lp{3.5in}}
% This yields error "\midrule ->\noalign":
%\begin{tabular}{>{\centering}p{\widthof{Symbolic}}l>{\raggedright}p{3.5in}}
\toprule
Symbolic algebra & Code variable & Explanation \
\midrule
$x_i$ & ifPrj(i) &
The quick brown fox jumped over the lazy dogs.
The quick brown fox jumped over the lazy dogs.
The quick brown fox jumped over the lazy dogs.
The quick brown fox jumped over the lazy dogs.
\
\bottomrule
\end{tabular}
\end{document}
This page was cited as answering the question, but I find that the information is much more broadly encompassing about how to use alignment commands. My question here is very focused on a specific error. People are likely to search based on a specific error.
\raggedright\arraybackslash. – egreg Sep 09 '22 at 16:45