# How to automatically suppress page number or change to plain pagestyle whenever there is a landscape page

How to automatically suppress page number or change to plain pagestyle whenever there is a landscape page? Fancyhdr and fancy header looks really ugly in landscaped tables that has \begin{landscape} \begin{table}. I understand thispagestyle works, but it is very complicated to do it manually. Is there is an automatic solution that affects all tables with \begin{landscape}?

You can always define your own page, and then when you want that page to appear for just a single page in your document, you can define just that page as your own page style by using the \thispagestyle{mypage} command.

Example code for defining your own page style, or for setting the chapter page style, is shown below.

% SET CHAPTER PAGE STYLE TO THE 'PLAIN' FORMAT
\copypagestyle{chapter}{plain}% Copy plain page syle to chapter page style

% CREATE MY OWN PAGE STYLE
\makepagestyle{mypage}% Create 'mypage' page style
\makeevenfoot{mypage}% Adjust even footer for mypage page style
{LEF}% Left even footer
{CEF}% Center even footer
{REF}% Right even footer
\makeoddfoot{mypage}% Adjust odd footer for mypage page style
{LOF}% Left odd footer
{COF}% Center odd footer
{ROF}% Right odd footer

NOTE: This code goes in the preamble of the .TeX document, before the begin{document} line.