I'm trying to make a longtable that is wider than the textwidth at a certain moment. I've tried different things always ending up with a different problem:
First possibility: If I use the adjustwidth
environment the longtabu
does not align correctly. The left margin stays fixed and the right margin gets out of the page. This in contrast, if I do the exact same thing to make a tabu
(instead of longtabu
), it works perfectly. I think using the adjustwidth is the best way to go, but I can't manage to get it working.
Second possibility: I've found a solution using the fullwidth
package. That package does the trick on small longtable
s, but freezes when I'm trying to do it on my big longtable. The command \setlength\LTleft{-2cm}
didn't work as well.
The final option I tried was to use geometry
. But that changes the margin of the whole page thus making a page break which I'm not interested in. The code I used for this was
\newgeometry{left=1.2cm}
\begin{longtable}
long table stuff
\end{longtable}
\restoregeometry
Here's an example of what I want contra what I get
\documentclass[a4paper]{article}
\usepackage{longtable}
\usepackage{chngpage}
\usepackage{lipsum}
\usepackage{tabu}
\begin{document}
\section{This is the original textwidth.}
\lipsum[1]
\section{This is the width I need for my longtabu}
\begin{adjustwidth}{-1in}{-1in}
\begin{tabu} to \linewidth {*{13}{|X[l]} |}
01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 \\
01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 \\
01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 \\
01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 \\
\end{tabu}
\end{adjustwidth}
\section{This is what happens}
\begin{adjustwidth}{-1in}{-1in}
\begin{longtabu} to \linewidth {*{13}{|X[l]} |}
01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 \\
01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 \\
01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 \\
01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 \\
\end{longtabu}
\end{adjustwidth}
\end{document}
Best Answer
With
longtable
you can do this, iftabu
has broken it then that's a problem withtabu
:-)