I am relatively new to Latex and I have currently a problem when generating a longtable that spans across multiple pages and the wrapping of a footnote and or other text within the table. Please find my example code below. I tried to use the
\multicolumn
command as I want that the text goes across all four columns, however, this does not work properly i.e. no wrapping. Furthermore, I tried to use \caption*
, did not work either. Has somebody any suggestions on how I can do this?Thank you and kind regards
Andreas
Code: Select all
\begin{center}
\begin{longtable}{ccrr}
\caption[Descriptive statistics]{Descriptive statistics} \label{tab:Descriptive statistics} \\
[b]Here I want a text that goes across the four columns and is wrapped at the end on new rows. If possible, this should appear on each page. Alternatively, this can be put at the end of the table. [/b]
\multicolumn{4}{l}{Panel A: XXX} \\
\hline
\rule{0pt}{3ex}
\multirow{2}{*}{XXX} &
\multirow{2}{*}{XXX} &
\multicolumn{2}{c}{XXX)} \\
& & \multicolumn{1}{c}{XXX} & \multicolumn{1}{r}{XX} \\
\hline \\ [-2ex]
\endfirsthead
\multicolumn{4}{c}%
{\small{{\bfseries \tablename\ \thetable.{}} XXX (continued)}} \\ [1ex]
\hline \\ [-2ex]
\endhead
\hline \multicolumn{4}{r}{{Continued on next page}} \\
\endfoot
\endlastfoot
XXX & XXX & XXX & XXX \\
\multicolumn{4}{l}{Panel B: XXX}\\
\hline
& & \multicolumn{1}{c}{XXX} & \multicolumn{1}{r}{XXX} \\
\hline
\end{longtable}
\end{center}