Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{longtable}
- usepackage{array}
- newcolumntype{C}[1]{>{centeringarraybackslashhspace{0pt}}p{#1}}
- usepackage[legalpaper,landscape,left=25.0mm,right=25.0mm]{geometry}
- parindent 0.0mm
- begin{document}
- newlength{ncw}
- setlength{ncw}{10.00mm}
- In this table, I can accommodate up to Category 3.
- begin{longtable}[l]{|*{13}{C{ncw}|}}
- hline
- multicolumn{4}{|c|}{Category 1}&multicolumn{3}{c|}{Category 2}&multicolumn{6}{c|}{Category 3}\hline
- Sc11&Sc12&Sc13&Sc14&Sc21&Sc22&Sc23&Sc31&Sc32&Sc33&Sc34&Sc35&Sc36\hline
- endhead
- hline
- endfoot
- 11&12&13&14&21&22&23&31&32&33&34&35&36\hline
- 11&12&13&14&21&22&23&31&32&33&34&35&36\
- end{longtable}
- The rest (Category 4--Category 6) goes in this table.
- begin{longtable}[l]{|*{20}{C{ncw}|}}
- hline
- multicolumn{8}{|c|}{Category 4}&multicolumn{5}{c|}{Category 5}&multicolumn{7}{c|}{Category 6}\hline
- Sc41&Sc42&Sc43&Sc44&Sc45&Sc46&Sc47&Sc48&Sc51&Sc52&Sc53&Sc54&Sc55&Sc61&Sc62&Sc63&Sc64&Sc65&Sc66&Sc67\hline
- endhead
- hline
- endfoot
- 41&42&43&44&45&46&47&48&51&52&53&54&55&61&62&63&64&65&66&67\hline
- 41&42&43&44&45&46&47&48&51&52&53&54&55&61&62&63&64&65&66&67\
- end{longtable}
- However, I will want to have the above textit{breaks} achieved
- automatically from a specification like the following.
- begin{longtable}[l]{|*{33}{C{ncw}|}}
- hline
- multicolumn{4}{|c|}{Category 1}&multicolumn{3}{c|}{Category 2}&multicolumn{6}{c|}{Category 3}&multicolumn{8}{|c|}{Category 4}&multicolumn{5}{c|}{Category 5}&multicolumn{7}{c|}{Category 6}\hline
- Sc11&Sc12&Sc13&Sc14&Sc21&Sc22&Sc23&Sc31&Sc32&Sc33&Sc34&Sc35&Sc36&Sc41&Sc42&Sc43&Sc44&Sc45&Sc46&Sc47&Sc48&Sc51&Sc52&Sc53&Sc54&Sc55&Sc61&Sc62&Sc63&Sc64&Sc65&Sc66&Sc67\hline
- endhead
- hline
- endfoot
- 11&12&13&14&21&22&23&31&32&33&34&35&36&41&42&43&44&45&46&47&48&51&52&53&54&55&61&62&63&64&65&66&67\hline
- 11&12&13&14&21&22&23&31&32&33&34&35&36&41&42&43&44&45&46&47&48&51&52&53&54&55&61&62&63&64&65&66&67\
- end{longtable}
- end{document}
Add Comment
Please, Sign In to add comment