1

This question already has an answer here:

I'm trying to create a longtabu that is a bit wider than the normal margins.

other answers refer to adjustwidth and tabular/tabularx/table. They don't appear to work for longtabu/tabu.

\documentclass{article}

\usepackage{tabu}
\usepackage{longtable}

\usepackage{changepage}

\begin{document}

\newlength{\mylength}
\setlength{\mylength}{\paperwidth}
\addtolength{\mylength}{-2cm}

%\hspace*{-4.5cm}\begin{minipage}[c]{\mylength}
\begin{adjustwidth}{-20cm}{}
\begin{longtabu} to \mylength  {| p{1.5cm} | p{2cm} | p{5cm}| X |}
\hline
a & b & c & d \\
\hline
\end{longtabu}

\end{adjustwidth}
%\end{minipage}
\end{document}

EDITS: Using minipage breaks the long table aspect of the table. Just runs off the end of the page if you have a lot of rows.

The commented hspace/minipage does work but it looks clunky. Surely, there's a perttier way. Why can't I just say "center this table on the page. forget the margins"?

no I don't want to move over by 20cm. it's a number I picked to make it clear that something actually happened.

The data in this example is only an example. My actual data wants to use as much of the page as possible. Use of the right side is a simple matter of overflow. I also want to get back some of the space on the left.

marked as duplicate by egreg, Mico, Andrew, barbara beeton, Paul Gessler Apr 1 '15 at 12:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Welcome to TeX SE! Well, it is not on a page, is it. It is (potentially) on several pages and that makes it more complicated... – cfr Mar 31 '15 at 22:32
  • 1
    Welcome to TeX SE! You can't seriously want to reduce the left margin by 20cm, surely? I'm actually finding it hard to figure out what the problem is you are trying to solve. I tried to wind back your adjustments to just get the table before you tried to box it and so on, but then the table isn't too wide. I just get an underfull vertical box. Can you change your example so it reproduces the problem? – cfr Mar 31 '15 at 22:38
  • My recommendation: run away from tabu – Mario S. E. Mar 31 '15 at 22:55
  • @cfr i think we need some thing like \LTright and \LTleft for longtable but i don't know. – touhami Mar 31 '15 at 23:12
  • @cfr see updates to the question. – mmccoo Mar 31 '15 at 23:22
1

Please try to avoid tabu. As stated by jon here:

I would recommend staying away from tabu as the package author is still fiddling with things and explicitly promised that there would not be backwards compatibility. See here for the discussion.

If you are trying to get the 'X' funcionality of tabularx with the breakable option of longtable, Alan Munn recommends using the ltxtable package (link to CTAN), written by David Carlisle (see here).

Other thing you can do is still use tabularx, put it inside a table environment and reduce its size. You can always rotate it 90 degrees to get a more space.

For more information about table packages, please refer to this question.

  • this does not answer the question (sorry) – touhami Mar 31 '15 at 23:43
  • @touhami Too long for a comment, wasn't intended as a comprehensive answer. – Mario S. E. Mar 31 '15 at 23:49
  • I switched to using longtable. – mmccoo Apr 6 '15 at 16:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.