Page LayoutSuppress Page Number on certain Page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
lynnlee
Posts: 50
Joined: Fri Jan 04, 2013 10:15 am

Suppress Page Number on certain Page

Post by lynnlee »

Hello LaTeX Community,

I use the sidewaystable environment from rotating to add a rotated table in the text. The table occupies one separate page. But I'd like to suppress this page number with table on it, and only this page, not the whole document. How to do this? Any suggestion is appreciated.

Lynn

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Suppress Page Number on certain Page

Post by localghost »

Since the solution depends on your document setup, we will need a self-contained and minimal example. The example should contain possibly used packages for page styles such as fancyhdr that customize the headers and footers.


Thorsten
lynnlee
Posts: 50
Joined: Fri Jan 04, 2013 10:15 am

Suppress Page Number on certain Page

Post by lynnlee »

Thank you, Thorsten.

The code I used is as follows.

Code: Select all

\documentclass[a4paper,11pt]{article}
\usepackage{blindtext,pdflscape}
\usepackage{rotating}

\begin{document}
\blindtext
\blindtext
\blindtext

\thispagestyle{empty}
\begin{sidewaystable}
\begin{tabular}{|l|l|l|l|l|}\hline  
 & rep78 2  & rep78 3  & rep78 4  & rep78 5  \\ \hline  
headroom & 259.99458 & -366.52775 & -1375.5277 & 64.358897 \\ \hline 
trunk & -1301.6058 & 53.217457 & 107.68253 & 319.25439 \\ \hline 
weight & 14.888719 & 5.4869986 & 1.3003615 & 1.1344623 \\ \hline 
length & 288.29056 & -80.263554 & 64.18982 & 129.15974 \\ \hline 
turn & -1289.3648 & -21.576337 & -453.0486 & -85.001797 \\ \hline 
cons & -27358.645 & 5133.0408 & 10552.075 & -19494.267 \\ \hline 
\end{tabular}
\end{sidewaystable}

\blindtext
\blindtext

\end{document}
The rotated table is on second page. I'd like to suppress the numbering of second page, but leave first and third pages unchanged. So, the total numbering of this document should be 2 pages. However, with the code above, I actually suppressed the page numbering of the whole document. This is not I needed. How to suppress the page numbering for table page only? Any suggestion is appreciated.

Lynn
Last edited by lynnlee on Thu Jun 13, 2013 5:31 am, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Suppress Page Number on certain Page

Post by localghost »

Bad news. All my ideas and approaches for a solution failed. At the moment I can't help you.
lynnlee
Posts: 50
Joined: Fri Jan 04, 2013 10:15 am

Suppress Page Number on certain Page

Post by lynnlee »

Sorry, I did not write it clearly.

I revised the code.

Code: Select all

\documentclass[a4paper,11pt]{article}
\usepackage{blindtext,pdflscape}
\usepackage{rotating}
\usepackage{fancyhdr}

\begin{document}
\blindtext
\blindtext
\blindtext

\makeatletter
\thispagestyle{empty}
\makeatother
\begin{sidewaystable}
\begin{tabular}{|l|l|l|l|l|}\hline  
 & rep78 2  & rep78 3  & rep78 4  & rep78 5  \\ \hline  
headroom & 259.99458 & -366.52775 & -1375.5277 & 64.358897 \\ \hline 
trunk & -1301.6058 & 53.217457 & 107.68253 & 319.25439 \\ \hline 
weight & 14.888719 & 5.4869986 & 1.3003615 & 1.1344623 \\ \hline 
length & 288.29056 & -80.263554 & 64.18982 & 129.15974 \\ \hline 
turn & -1289.3648 & -21.576337 & -453.0486 & -85.001797 \\ \hline 
cons & -27358.645 & 5133.0408 & 10552.075 & -19494.267 \\ \hline 
\end{tabular}
\end{sidewaystable}

\blindtext
\blindtext

\end{document}
Now, the page number does not show on first page, it starts on second page. But what I need is to let the 2nd page without page numbering, and the 1st page numbered 1, 3rd page numbered 2. What should I do? Any suggestion is appreciated.

Lynn
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Suppress Page Number on certain Page

Post by localghost »

lynnlee wrote:Sorry, I did not write it clearly. […]
It's not about your example, which is OK. The problem is that all my approaches to get a solution didn't have the desired result. And although I managed to spot the relevant code from rotating, I'm not able to patch it accordingly.
lynnlee wrote:[…] Now, the page number does not show on first page, it starts on second page. But what I need is to let the 2nd page without page numbering, and the 1st page numbered 1, 3rd page numbered 2. What should I do? Any suggestion is appreciated. […]
I think this is not the way to go because it could irritate the reader of your document. Even if you suppress the page number on the page with the table, numbering should continue normally. Furthermore I'm not sure if suppression of the page number is a good idea. Nevertheless I will continue to search for a solution.
lynnlee
Posts: 50
Joined: Fri Jan 04, 2013 10:15 am

Re: Suppress Page Number on certain Page

Post by lynnlee »

Thank you, Thorsten. Your suggestion is reasonable.

The reason why I try to suppress page number on certain page is that I think it is good looking if the page with rotated table skip its number(without page numbering). I appreciate for your help.

Lynn
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Suppress Page Number on certain Page

Post by localghost »

lynnlee wrote:[…] The reason why I try to suppress page number on certain page is that I think it is good looking if the page with rotated table skip its number(without page numbering). I appreciate for your help. […]
As I already suggested as reply to another of your questions, it is not really recommendable to alter the page style in this way. Just take a good book as example. E.g. Blank page would be another story.
lynnlee
Posts: 50
Joined: Fri Jan 04, 2013 10:15 am

Re: Suppress Page Number on certain Page

Post by lynnlee »

Thank you, Thorsten. I understand.

Lynn
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Suppress Page Number on certain Page

Post by cgnieder »

Here is an idea that works: use the floatpag package and its macro \thisfloatpagestyle inside the sidewaystable:

Code: Select all

\documentclass[a4paper,11pt]{article}
\usepackage{blindtext}
\usepackage{fancyhdr}

\usepackage{pdflscape}
\usepackage{rotating}
\usepackage{floatpag}

\begin{document}
\blindtext
\blindtext
\blindtext

\begin{sidewaystable}
\thisfloatpagestyle{empty}%
\begin{tabular}{|l|l|l|l|l|}\hline  
 & rep78 2  & rep78 3  & rep78 4  & rep78 5  \\ \hline  
headroom & 259.99458 & -366.52775 & -1375.5277 & 64.358897 \\ \hline 
trunk & -1301.6058 & 53.217457 & 107.68253 & 319.25439 \\ \hline 
weight & 14.888719 & 5.4869986 & 1.3003615 & 1.1344623 \\ \hline 
length & 288.29056 & -80.263554 & 64.18982 & 129.15974 \\ \hline 
turn & -1289.3648 & -21.576337 & -453.0486 & -85.001797 \\ \hline 
cons & -27358.645 & 5133.0408 & 10552.075 & -19494.267 \\ \hline 
\end{tabular}
\end{sidewaystable}

\blindtext
\blindtext

\end{document}
Regards
site moderator & package author
Post Reply