2

Is there any possibility to fix the longtable inside the longtable, as per client requirement. Please suggest how to fix this.

\documentclass{book}
\usepackage{longtable}

\begin{document}

\begin{longtable}{llllllllll}
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & \begin{longtable}{llll}
                                        1&2&3&1&1\\
                                        1&5&4&9&7\\
                                        1&2&3&1&1\\
                                        1&5&4&9&7\\
                                        1&2&3&1&1\\
                                        1&5&4&9&7\\
                                        1&2&3&1&1\\
                                        1&5&4&9&7\\
                                        \end{longtable} \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\end{longtable}
\end{document}
2

why you should nest a long table? it shouldn't be braked over page since it is one cell (row) of mine table. a `tabular should do your job:

\documentclass{book}
\usepackage{longtable}

\begin{document}
    \begin{longtable}{*{10}l}
1  & 1  & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1  & 1  & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1  & 1  & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1  & 1  & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1  & 1  & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & \begin{tabular}{@{} *{5}{l}}
                                        1 & 5 & 4 & 9 & 7\\
                                        1 & 2 & 3 & 1 & 1\\
                                        1 & 5 & 4 & 9 & 7\\
                                        1 & 2 & 3 & 1 & 1\\
                                        1 & 5 & 4 & 9 & 7\\
                                        1 & 2 & 3 & 1 & 1\\
                                      \end{tabular}\\
1  & 1  & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1  & 1  & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1  & 1  & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1  & 1  & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1  & 1  & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
    \end{longtable}
\end{document}

enter image description here

1

Or you could just use a 14 column longtable from the start. This will allow you to pagebreak anywhere.

\documentclass{book}
\usepackage{longtable}

\newcommand{\skipnine}{&&&&&&&&&}

\begin{document}

\begin{longtable}{llllllllllllll}
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 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 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
10 & 10 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\end{longtable}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.