The following code does compile
\documentclass{article}
\usepackage{longtable}
\begin{document}
\begin{longtable}{c}
\noalign{\bfseries $r$ test}
\multicolumn{1}{c}{Line 1}
\end{longtable}
\end{document}
but this one does not
\documentclass{article}
\usepackage{longtable}
\begin{document}
\begin{longtable}{c}
\noalign{\bfseries\boldmath $r$ test}
\multicolumn{1}{c}{Line 1}
\end{longtable}
\end{document}
I got the error message misplaced \omit
. I have to double the braces:
\noalign{{\bfseries\boldmath $r$ test}}
Any ideas why?
\noalign
you should always use a nested parbox or minipage or at least\@parboxrestore
(\par
is defined to do nothing, baseline spacing is zero....)