Graphics, Figures & TablesLandscape tables messed up with uni template - suggestion where I can look to fix it?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
TomWrite
Posts: 8
Joined: Sun Oct 17, 2021 7:49 pm

Landscape tables messed up with uni template - suggestion where I can look to fix it?

Post by TomWrite »

Hello everyone,
I am quite new to LaTeX and got a template from my university. Currently I try to include a landscape table.
The question might be a bit challenging, but maybe anyone has an idea.

In my project I use the \usepackage{rotating} and sidewaystable together with \usepackage{tabularx} to achieve the automatic line wrap in a cell.

When I post my code in a blank document, it kinda works as expected. When I use the template from my uni it is incredibly off. The top of the table is always off the page, while half of it is blank.

I came across many pages, recommend adjustbox etc. but none worked.

Does anyone know which setting might cause this and where I should look for this?

Any help really appreciated. I try to post my working code here:

Code: Select all

Code, edit and compile here:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{rotating, graphicx}
\usepackage{tabularx}
\usepackage{adjustbox}
\title{test}
\begin{document}
\maketitle
\section{Introduction}
\begin{sidewaystable}[!ht]
\centering
\small
\label{Tabelle}
\begin{tabularx}{\textwidth}{ccXXcc}
\hline
Interview ID & Interviewee ID & Title & Type of Organisation & Company size (employees) & Company size (revenue)\\
\hline\hline
C19-S-001&S001&CIO&Chemicals and process industry&88500&10,7 Mrd. € (2020)\\
C19-B-004&B004&Software Engineer&Finance&48883&22,389 Mrd. € (2020)\\
C19-S-001&S001&CIO&Chemicals and process industry&88500&10,7 Mrd. € (2020)\\
C19-B-004&B004&Software Engineer&Finance&48883&22,389 Mrd. € (2020)\\
C19-S-001&S001&CIO&Chemicals and process industry&88500&10,7 Mrd. € (2020)\\
C19-B-004&B004&Software Engineer&Finance&48883&22,389 Mrd. € (2020)\\
C19-S-001&S001&CIO&Chemicals and process industry&88500&10,7 Mrd. € (2020)\\
C19-B-004&B004&Software Engineer&Finance&48883&22,389 Mrd. € (2020)\\
C19-S-001&S001&CIO&Chemicals and process industry&88500&10,7 Mrd. € (2020)\\
C19-B-004&B004&Software Engineer&Finance&48883&22,389 Mrd. € (2020)\\
C19-S-001&S001&CIO&Chemicals and process industry&88500&10,7 Mrd. € (2020)\\
C19-B-004&B004&Software Engineer&Finance&48883&22,389 Mrd. € (2020)\\
\end{tabularx}
\end{sidewaystable}
\end{document}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The way it looks for me when using my uni template is attached as screenshot
Attachments
Screenshot 2021-10-17 at 20.10.05.png
Screenshot 2021-10-17 at 20.10.05.png (140.94 KiB) Viewed 3767 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
User avatar
Stefan Kottwitz
Site Admin
Posts: 10312
Joined: Mon Mar 10, 2008 9:44 pm

Landscape tables messed up with uni template - suggestion where I can look to fix it?

Post by Stefan Kottwitz »

Hi Tom,

welcome to the forum!

Hard to say without seeing the template code. Can you share the template, or the preamble code?

Otherwise you can take a copy of the template with that table, and then remove lines from the template (preamble) step by step and recompile every step. At some point you will notice the a change with that table behavoir, then you found the responsible line or setting. If it's not clear then, tell us which code piece caused that change and we may see how to fix it.

Stefan
LaTeX.org admin
TomWrite
Posts: 8
Joined: Sun Oct 17, 2021 7:49 pm

Landscape tables messed up with uni template - suggestion where I can look to fix it?

Post by TomWrite »

Hi Stefan,

thanks for the welcome and your reply.

I just played around with it and this is the code that worked for me. I also played with longtable to have an automatic pagebreak of longer tables. Unfortunately this never worked. So I simply manually created individual tables and adjusted them the the page width (due to landscape format)

Code: Select all

Code, edit and compile here:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{rotating, graphicx}
\usepackage{tabularx}
\usepackage{lscape}
\title{test}
\begin{document}
\maketitle
\section{Introduction}
\begin{landscape}
\begin{table}
\caption{Tabular overview of interviews. Expert group: business experts}
\label{tab:bizInterviews}
\begin{tabularx}{\linewidth}{X X X X X X}
\hline
Interview ID & Interviewee ID & Title & Type of Organisation & Organisation size - employees (2020) & Company size - revenue/budget (2020)\\
\hline
\end{tabularx}
\end{table}
\end{landscape}
\end{document}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Maybe this helps someone else to work with tables.

Best
Tom
Post Reply