I am trying to remove the page numbering from a very wide and long table in landscape.
When I try using \thispagestyle{empty}
, this removes only the page numbering on the part of the table filling the first page only, leaving the other page numbers overlapping the table contents.
I have also tried using the package floatpag
described here: Suppress page number for a single page that only contains one large table?
But it makes no difference to the landscape page number position.
Please help me.
This is my script:
\documentclass[10pt]{article}
\usepackage[font=scriptsize]{caption}
\usepackage{graphicx}
\usepackage{pdflscape}
\newcounter{z}
\def\z{\stepcounter{z}[[[[[\thez]]]]]}
\makeatletter
\def\fudge#1#2{%
\addtolength\textheight{#1}%
\@colroom\textheight
\vsize\textheight
\@colht\textheight
\def\LS@rot{%
\setbox\@outputbox\vbox{\hbox{\kern-#2\rotatebox{90}{\box\@outputbox}}}}%
\clearpage}
\makeatother
\usepackage{longtable}
\usepackage{fancyhdr}
\pagestyle{myheadings}
\begin{document}
\begin{landscape}
\fudge{3cm}{1.5cm}% 3cm longer and raise by 1.5cm
\advance\LTcapwidth by 360pt
{\footnotesize % Switch from 12pt to 11pt; otherwise, table won't fit
\setlength\LTleft{-100pt} % default: \fill
\setlength\LTright{-30pt} % default: \fill
\begin{longtable}{@{\extracolsep{\fill}}lllllllllllllll@{}}
\caption*{
\bf{All results}}
\tabularnewline \hline
col_1 & col_2 & col_3 & col_4 & col_5 & col_6 & col_7 & col_8 & col_9 & col_10 & col_11 & col_12 & col_13 & col_14 & col_15\\
This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\
This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\
This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\
This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\
This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\
This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\
This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\
This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\
\hline
\end{longtable}}
\begin{flushleft} Results using a long and wide table \end{flushleft}
\end{landscape}
\end{document}
Best Answer
Only affects one page, use
and then if necessary change back with
after the table, although as noted in comments this should not be needed if you switch to empty page style inside the landscape region, as it should switch back automatically at the end of the environment.