I'm trying to create a sort of table which: a) is the same width as my text, b) has columns with predefined widths; c) has cells which span over multiple columns; and d) wraps text in these multicolumns.
Basically, I'm trying to recreate something like this (horizontal and vertical lines are just included to see where the multicolumn cells should be, the final table should not have any lines):
I thought I almost got it using this solution, but it creates LaTeX to crash with the errors "Forbidden control sequence found while scanning use of \NC@find. Province: &", "Missing \endgroup inserted. Province: &", and "Extra alignment tab has been changed to \cr. Province: & Baetica &".
This is the code I used to create the (non-working) table (the precise column width will probably require some more tweaking, but you should get a general idea):
\documentclass[]{article}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\begin{document}
\begin{table}[tb]
\centering
\begin{tabular}{p{2.5cm} p{4cm} p{2.5cm} p{4cm}}
\textsc{edcs-id}: & \textsc{edcs}-9000163 & Dating: & 101 to 200 \\
Publication: & \multicolumn{3}{C}{CIL 02-07, 00154} \\
Findspot: & \multicolumn{3}{C}{Montoro / Ad Lucos / Epora} \\
Province: & Baetica & Region: & Iberia \\
Diocese: & Hispaniae & Loc. Indicator: & True \\
Text: & \multicolumn{3}{C}{Di\{i\}s Manibus sacrum Antistius / Patriciensis vixit ann(os) LXXV / p(ius) i(n) s(uis) h(ic) s(itus) e(st) s(it) t(ibi) t(erra) l(evis)} \\
Cleantext: & \multicolumn{3}{C}{Dis Manibus sacrum Antistius Patriciensis vixit annos LXXV pius in suis hic situs est sit tibi terra levis} \\
Gender: & m & Legal Status: & unknown \\
Text-Length: & 60 & Funerary: & True \\
origo & Col. Patricia & Distance & 38 km
\end{tabular}
\end{table}
\end{document}
Any help and pointers as to where I'm making an error and how to arrive at the desired result are very much appreciated, thanks.
C
to take an argument likep
,\newcolumntype{C}[1]...
but you used it as\multicolumn{3}{C}
you would get the same error from\multicolumn{3}{p}
. see the answer you cite\multicolumn{2}{C{1.5cm}}