LaTeX forum ⇒ Graphics, Figures & TablesChange page layout in sideways figures/tables

Information and discussion about graphics, figures & tables in LaTeX documents.
JoEgner
Posts: 5
Joined: Thu Jul 22, 2010 10:18 pm

Change page layout in sideways figures/tables

Postby JoEgner » Thu Jul 22, 2010 10:26 pm

Hi,

I'd like to remove the page number (and possibly also change the page margins) on a floating page created by the rotating-package. \thispagestyle{empty} seems unhelpful.

In the below example, there should be no page numbering on the second page:

  1. \documentclass{article}
  2. \usepackage[british]{babel}
  3. \usepackage{rotating}
  4.  
  5. \begin{document}
  6. Text
  7. \begin{sidewaystable}A\thispagestyle{empty}\end{sidewaystable}
  8. \newpage Text
  9. \end{document}


Any help would be appreciated -- Jo
Last edited by JoEgner on Sun Jul 25, 2010 7:58 pm, edited 1 time in total.

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

Postby php1ic » Fri Jul 23, 2010 3:32 pm

You need to put the pagestyle outside of the float environment
  1. \documentclass{article}
  2. \usepackage[british]{babel}
  3. \usepackage{rotating}
  4.  
  5. \begin{document}
  6. Text
  7. \newpage
  8. \thispagestyle{empty}
  9. \begin{sidewaystable}[p]
  10. \caption{This is a caption}
  11. \end{sidewaystable}
  12. \clearpage
  13. Text
  14. \end{document}

JoEgner
Posts: 5
Joined: Thu Jul 22, 2010 10:18 pm

Postby JoEgner » Fri Jul 23, 2010 4:02 pm

Thanks, but this isn't what I'm after. \newpage and \clearpage make the floating page a "non-floating" object that appears at a deterministic location. In particular, there is a pagebreak due to \newpage which may occur right at the beginning of a page.

Jo

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

Postby php1ic » Fri Jul 23, 2010 4:38 pm

The fancyhdr package provides a special page style for float only pages (see p14 of the manual)
http://www.ctan.org/tex-archive/macros/ ... /fancyhdr/
  1. \documentclass{article}
  2.  
  3. \usepackage{rotating}
  4. \usepackage[english]{babel}
  5. \usepackage{blindtext}
  6. \usepackage{fancyhdr}
  7.  
  8. \pagestyle{\iffloatpage{empty}{fancy}}
  9. \renewcommand{\headrulewidth}{0pt}
  10. \fancyhf{}
  11. \fancyfoot[C]{\iffloatpage{}{\thepage}}
  12.  
  13. \begin{document}
  14. \Blindtext
  15.  
  16. \begin{sidewaystable}[htbp]
  17. \caption{This is a caption}
  18. \end{sidewaystable}
  19.  
  20. \blinditemize
  21. \Blindtext
  22.  
  23. \begin{figure}[htb]
  24. \caption{Figures caption}
  25. \end{figure}
  26.  
  27. \blindtext
  28. \end{document}

I haven't used it before and don't understand why the \iffloatpage command needs to be used for both the \pagestyle and \fancyfoot, but I think the above code does what you want.

JoEgner
Posts: 5
Joined: Thu Jul 22, 2010 10:18 pm

Postby JoEgner » Fri Jul 23, 2010 10:09 pm

Excellent -- many thanks!

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

Postby localghost » Sun Jul 25, 2010 7:45 pm

Now that the problem is solved, please mark the topic accordingly as described in Section 3 of the Board Rules.


Best regards
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

JoEgner
Posts: 5
Joined: Thu Jul 22, 2010 10:18 pm

Postby JoEgner » Sun Jul 25, 2010 7:59 pm

done


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: Google [Bot] and 5 guests