3

I have a Latex document with headers on each page.

On the pages where I have a 'sidewaysfigure', I want to remove the headers, because sometimes, the white borders of the large sideways figures overlap the header.

Is it possible to remove headers on pages where there are sidewaysfigures?


Edit -

So here is my minimal working example. I have a main file which calls the other files - sorry I don't know the correct terminology. It's called testlatex.tex. It calls a file called test.tex which has the sideways figure.

I have \thispagestyle{empty} in the sidewaysfigure environment, but the header and footer still appear.

testlatex.tex:

\documentclass[12pt,twoside]{ociamthesis}  % default square logo 

\usepackage[bottom=37mm,top=10mm,left=33mm,right=33mm]{geometry}
\usepackage{natbib}
\usepackage{calc}
\usepackage{aas_macros}
\usepackage{color}
\usepackage{longtable}
\usepackage{amsmath, amsthm, amssymb, amsfonts}
\usepackage{fourier} % The Fourier font package.
\usepackage{microtype} % Apparently this makes pdfs look nicer.
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{eucal} 
\usepackage{hyperref} 
\usepackage{multicol}
\usepackage{nomencl}
\usepackage{geometry}
\usepackage{setspace}
\usepackage{rotating}
\usepackage{changepage} 
\usepackage{subfigure}
\usepackage{dcolumn}
\usepackage{booktabs}
\usepackage{xfrac}
\usepackage{fancyhdr}
\setlength{\parindent}{0pt}
\usepackage[font={footnotesize}]{caption}
\let\oldtabular\tabular
\renewcommand{\tabular}{\footnotesize\oldtabular}
\include{mymacros}
\makenomenclature
\renewcommand{\nomname}{List of Symbols}
\renewcommand*{\nompreamble}{\begin{multicols}{2}}
\renewcommand*{\nompostamble}{\end{multicols}}
\setlength{\columnsep}{3em}
\title{Test title}
\abstracttitle{}
\author{a.n.other}             %your name
\DeclareMathSizes{12}{13}{8}{10}  % For size 12 text 
\begin{document}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\leftmark}
\fancyfoot[CE,CO]{\thepage}
\baselineskip=24pt plus1pt % this looks about double-line
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\pagenumbering{arabic}
\newgeometry{bottom=4cm,top=4cm,left=3.2cm,right=3.2cm}
\baselineskip=24pt plus1pt
\doublespacing
\include{test} 
\end{document}

Test.tex

\chapter{Test Chapter}
\ifpdf
    \graphicspath{{Chapter3/Chapter3Figs/PNG/}{Chapter3/Chapter3Figs/PDF/}   {Chapter3/Chapter3Figs/}}
\else
    \graphicspath{{Chapter3/Chapter3Figs/EPS/}{Chapter3/Chapter3Figs/}}
\fi

\begin{sidewaysfigure*}[]
\thispagestyle{empty}
\begin{center}
\includegraphics[ width=200mm]{anything.png}
\caption[]{Figure caption here.}
\end{center}
\end{sidewaysfigure*}
9
  • 1
    \thispagestyle{empty}?
    – Johannes_B
    Jun 25, 2015 at 9:35
  • But where would I put that in the tex document to ensure that it was acting on the same page as the figure will appear? Jun 25, 2015 at 9:38
  • 2
    Within the sidewaysfigure environment.
    – Johannes_B
    Jun 25, 2015 at 9:39
  • That didn't seem to remove the header. Jun 25, 2015 at 10:27
  • If it really didn't we need to see a minimal working example.
    – Johannes_B
    Jun 25, 2015 at 10:32

1 Answer 1

3

With package floatpag you could use \rotfloatpagestyle{<pagestyle>}

Example:

\documentclass{book}
\usepackage{blindtext}
\usepackage{rotating}

\usepackage{floatpag}
\rotfloatpagestyle{empty}
\begin{document}
\blinddocument
\blindtext
\begin{sidewaysfigure}
\centering
\fbox{\parbox[c][.5\textwidth][c]{.5\textwidth}{\centering\Huge Figure}}
\end{sidewaysfigure}
\Blindtext
\end{document}

enter image description here

There is also the command \thisfloatpagestyle{<pageststyle>} that can be used inside the float environment.

\documentclass{book}
\usepackage{blindtext}
\usepackage{rotating}

\usepackage{floatpag}
\begin{document}
\blinddocument
\blindtext
\begin{sidewaysfigure}
\thisfloatpagestyle{empty}
\centering
\fbox{\parbox[c][.5\textwidth][c]{.5\textwidth}{\centering\Huge Figure}}
\end{sidewaysfigure}
\Blindtext
\end{document}
2
  • This almost worked perfectly, but on the pages where I have non-sideways figures (and no text), the header remains (which is fine) but the underline of the header and the page number footer disappear. Jun 25, 2015 at 14:21
  • Actually the page number moves to the top right of the page. Jun 25, 2015 at 14:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .