\newcolumntype{Q}[1]{>{\centering\arraybackslash}p{#1}}
what does [1]
and p{#1}
mean ?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityp
is a standard latex array column specifier
\begin{tabular}{cp{3cm}}
means that each cell in the second column is a parbox of width 3cm
Q
here is defined as a new column type taking an argument Q{...}
where #1
denotes the argument. so Q{3cm}
expands to >{\centering\arraybackslash}p{3cm}
which is a p
column with \centering
applied to each cell.
See the array
package manual (texdoc array
) for more details.