Graphics, Figures & Tablesrotating | 'sidewaystable' and tabularx or tabulary

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Sytske
Posts: 4
Joined: Tue Oct 11, 2011 6:39 pm

rotating | 'sidewaystable' and tabularx or tabulary

Post by Sytske »

I have been able to create a sideways table using the rotating package (a working example is presented below). However, when I want to combine the rotating package and either tabularx or tabulary, Latex protests. I have been searching whether it is possible to use tabularx or tabulary with rotating, but I can not find it. Does anyone know whether it is possible to use these packages together?

Code: Select all

\documentclass[twoside]{report}
\usepackage{rotating}
\usepackage{tabulary}

\begin{document}

\begin{sidewaystable}[h]\footnotesize
\centering
\begin{tabular}{l r c } 
\hline
\noalign{\smallskip}
test & test & test\\
\hline
\end{tabular}
 \caption{}\label{rotfloat2}
\end{sidewaystable}

\end{document}
And this doesn't work:

Code: Select all

\begin{sidewaystable}[h]\footnotesize
\centering
\begin{tabulary}{L R c } 
\hline
\noalign{\smallskip}
test & test & test\\
\hline
\end{tabulary}
 \caption{}\label{rotfloat2}
\end{sidewaystable}

Thank you in advance for your help!
Sytske
Last edited by Sytske on Wed Oct 12, 2011 4:30 pm, edited 2 times in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

rotating | 'sidewaystable' and tabularx or tabulary

Post by localghost »

Take a close look at the tabulary manual to learn how to use the »tabulary« environment correctly.

Code: Select all

\begin{tabulary}{<length>}{<preamble>}
% table content
\end{tabulary}
You just forgot to specify the width of the table.

Next time please echo the exact error message(s) from the log file or attach it instead of just telling us that "it doesn't work". This is an absolutely inappropriate error description. Nevertheless, you provided a very good minimal example.


Best regards and welcome to the board
Thorsten
Sytske
Posts: 4
Joined: Tue Oct 11, 2011 6:39 pm

Re: rotating | 'sidewaystable' and tabularx or tabulary

Post by Sytske »

Dear Thorsten,
Thanks for your help!
It's interesting, because I had previously specified the table width, but got an error as well. Anyway, it works indeed, so that's great!
Thanks, Sytske
Post Reply