# Using seqsplit with multicolumn

I want to create a longtable with headers centered, columns left or right aligned. Thanks to my previous question: Right aligning two columns next to each other in longtable and its great answer, I've crafted this example document:

\documentclass{article}
\usepackage{array}
\usepackage{seqsplit}
\usepackage{longtable}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}

\begin{document}
\begin{longtable}{|L{3.32cm}|R{3.97cm}|R{3.14cm}|L{3.57cm}|}
\hline
\hline
\hline
some text goes here to illustrate the alignment & some text goes here to illustrate the alignment & some text goes here to illustrate the alignment & some text goes here to illustrate the alignment \\
some text goes here to illustrate the alignment & some text goes here to illustrate the alignment & some text goes here to illustrate the alignment & some text goes here to illustrate the alignment \\
some text goes here to illustrate the alignment & some text goes here to illustrate the alignment & some text goes here to illustrate the alignment & some text goes here to illustrate the alignment \\
some text goes here to illustrate the alignment & some text goes here to illustrate the alignment & some text goes here to illustrate the alignment & some text goes here to illustrate the alignment \\
\end{longtable}
\end{document}


The problem with this, is that seqsplit is not doing its job and splitting long words when width set is reached. See:

You don't need \multicolumn because the columns are declared as p ones: use \centering and just remember to add \arraybackslash for the last one (or end the row with \tabularnewline.

\documentclass{article}
\usepackage{array}
\usepackage{seqsplit}
\usepackage{longtable}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} % may come handy
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}

\begin{document}
\begin{longtable}{|L{3.32cm}|R{3.97cm}|R{3.14cm}|L{3.57cm}|}
\hline
\hline

This is not a problem with seqsplit. You explicitly told latex that your header is a centered line (c). It does what you asked. You need to make your multicolumn type p{...} for latex to split it.
• @maraujop: You can add \centering. – Heiko Oberdiek Jun 17 '13 at 18:06