[Tex/LaTex] Center content in longtable

horizontal alignmentlongtable

I have this table

\documentclass[a4paper]{scrartcl}
\usepackage{longtable}
\begin{document}

\begin{longtable}{c|p{6cm}p{4cm}p{4cm}}
\hline
Blub & Bla & Blip & Blop \\
Blub & Bla & Blip & Blop \\
\hline
\end{longtable}
\end{document}

Now, for whatever reason, I would like to center ONE cell of the second column.
How would I achieve that?

Best Answer

Since you're using a paragraph column type (with fixed length), you can issue \centering inside the cell to centre it:

\documentclass[a4paper]{scrartcl}
\usepackage{longtable}
\begin{document}

\begin{longtable}{c|p{6cm}p{4cm}p{4cm}}
\hline
Blub & Bla & Blip & Blop \\
Blub & \centering Bla & Blip & Blop \\
\hline
\end{longtable}
\end{document}

Other column types (like l and r) requires a different approach.

Related Question