Here below are codes for two latex tables (generated by pandoc with a lua filter). The first table renders perfectly. The second nested table throws an error. Can you help diagnose the problem?
THE LUA FILTER:
function RawBlock (raw)
if raw.format:match
'html' then
return
pandoc.read(raw.text, 'html').blocks
end
end
THE ERROR MESSAGE:
Runaway
argument?
\global
\advance \c@LT@chunks \@ne \global \LT@rows \z@ \setbox \z@ \vbox \ETC.
!
Forbidden control sequence found while scanning use of \LT@nofcols.
<inserted
text>
\par
l.176
\begin{longtable}[]{@{}rrr@{}}
TABLE 1:
\begin{longtable}[]{@{}rrr@{}}
\caption{This
is a Caption}\tabularnewline
\toprule
a
& b & c \\
\midrule
\endfirsthead
\toprule
a
& b & c \\
\midrule
\endhead
1
& 10 & 100 \\
2
& 20 & 200 \\
3
& 30 & 300 \\
\bottomrule
\end{longtable}
TABLE 2 (a table of 2 tables):
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\columnwidth
- 2\tabcolsep) * \real{0.5000}}
>{\raggedright\arraybackslash}p{(\columnwidth
- 2\tabcolsep) * \real{0.5000}}@{}}
\toprule
\endhead
\begin{minipage}[t]{\linewidth}\raggedright
\begin{longtable}[]{@{}rrr@{}}
\caption{\textbf{This
is a Caption}}\tabularnewline
\toprule
a
& b & c \\
\midrule
\endfirsthead
\toprule
a
& b & c \\
\midrule
\endhead
1
& 10 & 100 \\
2
& 20 & 200 \\
3
& 30 & 300 \\
\bottomrule
\end{longtable}
\end{minipage}
& \begin{minipage}[t]{\linewidth}\raggedright
\begin{longtable}[]{@{}rrr@{}}
\caption{\textbf{This
is Another Caption}}\tabularnewline
\toprule
a
& b & c \\
\midrule
\endfirsthead
\toprule
a
& b & c \\
\midrule
\endhead
2
& 20 & 200 \\
4
& 40 & 400 \\
6
& 60 & 600 \\
\bottomrule
\end{longtable}
\end{minipage}
\\
\bottomrule
\end{longtable}
--