Page LayoutWidesplit to page-break large tables horizontally

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
jonathansfl
Posts: 1
Joined: Fri Nov 07, 2014 10:03 pm

Widesplit to page-break large tables horizontally

Post by jonathansfl »

trying to use widesplit to automatically page-break horizontally for a report with large table spanning multiple pages vertically and horizontally. Not only do we want the pages to span horizontally nicely, but also want the row and column headers to repeat on every page. longtable will handle the vertical, but horizontal seems to require widesplit, which we newbies can't seem to make work. what are we doing wrong?
We use macros to build the columns since the column count is variable, based on user input (columns headers are dates).
We use \include to insert our content.

Code: Select all

\documentclass[12pt]{report}

% set margins
\usepackage[]{geometry}
\geometry{landscape, headsep=1cm,headheight=2.5cm,letterpaper, top=1.75in, bottom=0.75in, left=0.75in, right=0.75in }

\usepackage{longtable}
\usepackage{fancyhdr}   % A header / footer management package
\usepackage{lastpage}
\usepackage{multirow}   % Used for multicolumn stuff

\include{data/property_guestpasses_per_day}     %include%

% Header / Footer Setup 
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[L]{Printed on \today}
\fancyfoot[R]{Page \thepage\ of \pageref{LastPage}}
\fancyhead[C]{ \fontfamily{ptm}\selectfont \Huge \CommunityName \\ \Large \ReportTitle   }

\advance\ColCount by 2


\usepackage{array}
% Main Document
\begin{document}
\widesplit{blah}{ %

    \begin{longtable}[12pt]{\TableSpec}
		\endfirsthead
		\multicolumn{5}{r}%
		{  \textit{Continued from previous page}} \\
		\hline
		\hline
		\endhead
		\hline \multicolumn{5}{r}{\textit{Continued on next page}} \\
		\endfoot
		\endlastfoot

		% Table Data
		\cline{3-\the\ColCount}
		\CrossTabColumns
		\CrossTabData

	\end{longtable} }

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply