Document Classeslandscape package problem

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
theenemy
Posts: 3
Joined: Sun Jun 22, 2008 5:44 pm

landscape package problem

Post by theenemy »

I'm a rookie and this is my first post,

I have a thesis document with 5 chapters, references and appendix. The problem is, on the abstract page I have a \pageref{lastpage} command to print the how many pages my thesis is. It should print the number of pages including the appendix pages. It used to work fine but recently (when I started using the landscape package) it doesn't work and returns ?? pages on the abstract page. I have tried tons of things to fix this and found out that it is the appendix section causing the problem. When I don't include appendix section (which is a seperate tex file appendix.tex) it works fine. Also, when I include the appendix.tex it works fine if I remove all \begin{landscape} .. \end{landscape} entries. My appendix.tex consists around 10-15 tables which are very large and they need to be fitted sideways.
I used to use the sidewaystable command which was working fine but the tables in consecutive pages were printed out as a left side page and a right side page which should not be. I need all the pages to be right side pages (that's why I started to use landscape command).
I thought that might be bacause of the order of the packages were loaded. I tried different combinations with no luck.
tha packages I use in this document in the preamble are (in order)
\usepackage{lscape} \usepackage{multicol} \usepackage{fixltx2e} \usepackage{graphicx} \usepackage{afterpage} \usepackage{algorithm}\usepackage{algorithmic} \usepackage{amsmath} \usepackage{txfonts} \usepackage{subfigure} \usepackage{amssymb}\usepackage{subfigure} \usepackage{multirow} \usepackage{colortbl} \usepackage{slashbox} \usepackage{appendix}

So if someone could guide me out of this problem that would be great.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

landscape package problem

Post by Stefan Kottwitz »

Hi,

welcome to the board!
Use pdflscape instead of lscape if you compile with pdflatex. If the problem persists of if you don't use pdflatex then let us know.

Btw. you are loading the subfigure package two times.

Stefan
LaTeX.org admin
theenemy
Posts: 3
Joined: Sun Jun 22, 2008 5:44 pm

Re: landscape package problem

Post by theenemy »

thank you stefan,

I tried the pdflscape package but the problem persists. I use pdf texify (in WinEdt). All pdflscape did for me was rotating the pages with the tables in the appendix in the final compiled pdf. Something still messing with pageref and I get the ?? pages in the abstract.

thanks for catching the subpackage mistake.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

landscape package problem

Post by localghost »

theenemy wrote:[…] I used to use the sidewaystable command which was working fine but the tables in consecutive pages were printed out as a left side page and a right side page which should not be. […]
The rotating package offers some options to get the floats aligned as you want. Just refer to Section 2 of the documentation.


Best regards and welcome to the board
Thorsten¹
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

landscape package problem

Post by Stefan Kottwitz »

Hi,

I can see that you don't use the lastpage package, you could try that.

Stefan
LaTeX.org admin
theenemy
Posts: 3
Joined: Sun Jun 22, 2008 5:44 pm

Re: landscape package problem

Post by theenemy »

ok,

I have tried rotating package but it did not work since I was not able to rotate both the figure and the caption. here is how I used it.
\vskip10pt
\begin{figure}[hbt]
\includegraphics[keepaspectratio,scale=0.7,angle=90]{pic/modelunit}
\caption{Model Units in the wave flume}
\label{fig:modelunit}
\end{figure}

@Stefan

I used the lastpage package, same result.
I am now using the pdflscape package which works fine but I had to remove the \begin{landscape}...\end{landscape} commands from the very last figure in the appendix section. and it works well and I got the correct number of pages in the abstract section. I will settle with this if any other solution comes up. just the very last figure (or table) should not be in landscape mode thats all. I tried to use sidewaysfigure command for the last figure, but that did not work also.
Post Reply