I am getting information written by users in many lines, paragraphs, and I have to put those inside a table, I would like to know if it is possible to instruct LaTeX to accept paragraphs inside a column or maybe inside a multicolumn?
If I try to process this
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{datetime}
\usepackage{array}
\usepackage{longtable}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\usepackage[spanish]{babel}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em}
\setlength{\textwidth}{17cm}
\setlength{\textheight}{21cm}
\setlength{\columnsep}{1.5pc}
\newenvironment{rtinformation}{
\begin{longtable}{|m{7cm}|c|m{7cm}|}
}
{
\hline
\end{longtable}
}
\newcommand{\rtsingle}[1]{
\hline
\multicolumn{3}{|p{15cm}|}{#1}\\
}
\newcommand{\rttitlesubsection}[1]{
\hline
\multicolumn{3}{c}{ \bf{#1} } \\
}
\newcommand{\rtrowinfo}[2]{
\hline
#1: & & #2 \\
}
\newcommand{\rttitlesection}[1]{
\hline
\multicolumn{3}{c}{} \\
\hline
\multicolumn{3}{|>{\columncolor[rgb]{0.8,0.8,0.8}}c|}{ #1 } \\
%\multicolumn{3}{|c|}{ #1 } \\
}
\begin{document}
\begin{rtinformation}
\rttitlesection{This is my section}
\rtrowinfo{¿Ha realizado alguna gestión respecto de este predio, ante otra entidad?}{Sí}
\rttitlesubsection{Descripción de gestión:}
\rtsingle{
There are
plenty
of paragraphs, the guilty is [table]xcolor
}
\end{rtinformation}
\end{document}
I get the error
! Paragraph ended before \multicolumn was complete.
<to be read again>
\par
It looks like \usepackage[table]{xcolor} is getting in the middle, is there a replacement for xcolor to put some colored rows in a table? If I comment the inclusion of the package and the lines
\multicolumn{3}{|>{\columncolor[rgb]{0.8,0.8,0.8}}c|}{ #1 } \\
\rttitlesection{This is my section}
Then LaTeX is able to process many paragraphs. Is there a suitable replacement for xcolor?
\\. It works for me after deleting it and adding some dummy rows. – egreg Jan 03 '12 at 22:20\\, but the brace after it! Moreover, recall that you can't use\\inside the argument to\multicolumn, use\newlineinstead. – egreg Jan 03 '12 at 22:40