Document Classessideways tables, landscape tables

Information and discussion about specific document classes and how to create your own document classes.
kostoglotov
Posts: 58
Joined: Sun Apr 27, 2008 12:50 pm

sideways tables, landscape tables

Post by kostoglotov »

Hi there,

I am trying to create a sideways table. It work perfectly when using both, \sidewaystable and \landsape. The problem is that the caption for this table doesn't work properly in the List of tables. All other "normal" tables work well in final pdf file so I can click on Table XY and it gets me there. Not to the sideways tables... I don't know why. Really annoying.

Can anyone help me with this? It would be GREAT.

Cheers,
A.k.

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

sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

sideways tables, landscape tables

Post by sommerfee »

kostoglotov wrote: It work perfectly when using both, \sidewaystable and \landsape.
It's not clear to me why you need both, sidewaystable and landscape, sidewaystable alone should be sufficient!?

This works fine here:

Code: Select all

\documentclass{article}
\usepackage{rotating}
\usepackage{hyperref}

\begin{document}
\listoftables
\clearpage
\section{A section}
Some text\ldots
\begin{sidewaystable}
  \centering A table
  \caption{A caption}
\end{sidewaystable}
\clearpage
Some more text\ldots
\end{document}
Could you please give us a small (but complete) example which shows your problem?
kostoglotov
Posts: 58
Joined: Sun Apr 27, 2008 12:50 pm

Re: sideways tables, landscape tables

Post by kostoglotov »

I don't need both - just wanted to say that i have tried both... and in both cases it messed it up...
cheers,
ak
kostoglotov
Posts: 58
Joined: Sun Apr 27, 2008 12:50 pm

Re: sideways tables, landscape tables

Post by kostoglotov »

The thing is: I have almost finish my thesis. It contains some 20 tables and list of tables. Captions are interactive, it works very well. Some tables, however, are too long so I want them rotate. When I do that - using either sidewaystables or landscape - links to those tables leads to other page that the one where they occur. The rest works well I have problem only with sideways tables...
Hope it clarified what i've meant.


or maybe better:
I have list of tables.
Table 2.1 is on page 11 in this list. I want to see it so I click on it an it goes to the page 11 directly to that table.
Table 2.2 is on page 14, but this table is sideways table, when clicking on it it doesn't go to the page 14 but somewhere else.... (6 for example....)
It doesn't work only for sideways tables, rest is ok... :((
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

sideways tables, landscape tables

Post by Stefan Kottwitz »

Hi kostoglotov,

it would be easier to help if you show us your code of such a table or even better provide a minimal working example. If you did that perhaps the problem would already have been solved, if there's some small mistake inside the code that we are able to see.

Stefan
LaTeX.org admin
kostoglotov
Posts: 58
Joined: Sun Apr 27, 2008 12:50 pm

sideways tables, landscape tables

Post by kostoglotov »

Here is an example of the table I converted into sideways table:

\begin{sidewaystable}[htdp]
\centering
\begin{tabular}{lccccccc}
\hline
first line\\
\hline\hline
second line\\
\hline
\end{tabular}
\caption[Properties of glass.]{\textbf{Properties of glass.}}
\label{gprop}
\end{sidewaystable}

It works but the List of the table which is created using:
\listoftables
I don't know what else can I show you since the table ITSELF works, list and captions also...
The only thing is that when clicking on the caption in the list of the tables it takes me on the place which is exactly 5 pages ahead of the one where the actual table is...
Is there anything else you need to know?

Subject: sideways tables, landscape tables
Stefan_K wrote:Hi kostoglotov,

it would be easier to help if you show us your code of such a table or even better provide a minimal working example. If you did that perhaps the problem would already have been solved, if there's some small mistake inside the code that we are able to see.

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

Re: sideways tables, landscape tables

Post by Stefan Kottwitz »

Hi kostoglotov,

your code works fine when I complete it to a small compilable document. I've put the table on page 3 and clicking on its entry in the list of tables it brings me to page 3. So the problem should be caused somewhere else.
Generally load the hyperref package after loading all the other packages (with exceptions). If you don't do it already, change that, it might help.

Stefan
LaTeX.org admin
kostoglotov
Posts: 58
Joined: Sun Apr 27, 2008 12:50 pm

Re: sideways tables, landscape tables

Post by kostoglotov »

Sorry mate, I am quite new to latex....
In the main file I have included this package:

\documentclass[oneside,11pt]{Latex/Classes/PhDthesisPSnPDF}
\usepackage{lscape}
\usepackage{rotating}
\usepackage{hyperref}

So what do you mean by "change it"? change what?

thanks a lot...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: sideways tables, landscape tables

Post by Stefan Kottwitz »

I meant just load hyperref as last package. If you you load other packages after hyperref it may cause problems, in that cas change it, that means, put \usepackage{hyperref} directly before \begin{document}.

I can see you load lscape, that can cause problems too, if you use pdflatex. In that case use pdflscape.

Stefan
LaTeX.org admin
kostoglotov
Posts: 58
Joined: Sun Apr 27, 2008 12:50 pm

Re: sideways tables, landscape tables

Post by kostoglotov »

I have tried to place \usepackage{hyperref} before \begin{sidewaystable}
but when compiling it ends up with an error... I also disabled \usepackage{lscape} because I don't need it any more...
Post Reply