How can I prevent multirow
from breaking in longtable
environment, so this won't break at wrong position as shown by code below.
\documentclass{article}
\usepackage{multirow,tabularx,ltxtable,filecontents}
\begin{document}
AAAA
\vspace{49em}
\begin{filecontents}{table.tex}
\begin{longtable}{!{\vrule width 1.2pt}c|c|>{\centering\arraybackslash}X!{\vrule width 1.2pt}}
\noalign{\hrule height 1.2pt}
\multirow{2}{*}{A} & B & C\\ \cline{2-3}% I shouldn't break here
& B & C\\ \hline % I can break here
\multirow{2}{*}{A} & BB & C\\ \cline{2-3}% I shouldn't break here
& B & C\\
\noalign{\hrule height 1.2pt}
\end{longtable}
\end{filecontents}
\LTXtable{\textwidth}{table.tex}
\end{document}
One more thing, how can I make the hline in breaking position become this:
\noalign{\hrule height 1.2pt}
tabular
(ortabularx
); so, atabular
inside alongtable
.tabular
inside alongtable
will have problem in align the columnstabularx
with twoX
-columns. If you can insert a more concrete example showing some sample data as well as your current problem, a more comprehensive solution that accommodates your needs could be suggested. Either way, it will just provide more scope in terms of the required solution, since you current entries are all equal in width...