3

I have a large table and want to put it on a page with smaller margins. A quick and dirty way would be

\clearpage \newgeometry{margin=1cm} \begin{table} ... \end{table} \restoregeometry 

However, this doesn't allow the table to float anymore.

I read the following Q&A: Standard way of handling oversize pages? But found 2 problems:

  1. for the horizontal adjustment I try use addmargin from KOMA script. It does the job, but I get an overfull hbox warning for every single line of the table, which makes log files really unreadable. Also it only changes the width of the table but not the table caption.

  2. for the vertical adjustment neither enlargethispage nor addlines works inside the table environment. And just doing \vspace* has the disadvantage that the table cannot be vertically centered on the page.

the perfect solution would be to have something like \newgeometry but within the floating environment. Is there anything like this?

3
  • 1
    horizontal margins can just be ignored eg put the tabular in \makebox[0pt[]{...} vertical can also be ignored so long as you have space between the page head and page foot, or if they are blank no reason why vspace should stop you centering in the available space. Commented Jan 7, 2017 at 19:10
  • How to center vertically when using vspace? To center it vertically I have to know the size of the vspace, right? Commented Jan 7, 2017 at 21:33
  • you can use \vspace*{\fill} above and below which will center vertically just as \hspace*{\fill} to left and right centres horizontally, so then you just need to arrange that the box is whatever size fits but you should know in advance the distance between your page head and foot. Commented Jan 7, 2017 at 21:35

2 Answers 2

4

Load the changepage package, and use this code to adjust locally the margins:

\begin{table} \begin{adjustwidth}{–some length}{–some other length} ................ \end{adjustwidth} \end{table} 
2
  • adjustwidth seems to do exactly the same as addmargin: It does change the margin but gives the overfull hbox warning and more importantly does not change the width of the table caption. Any idea how to resolve that? Commented Jan 7, 2017 at 21:32
  • 1
    It would be easier to help with a full, yet minimal, compilable code… Commented Jan 7, 2017 at 21:34
0

In this question (changepage package's \adjustwidth environment adjusts only left margin) @Werner gives the following response:

The adjustwidth environment of changepage takes two arguments, both of which are adjustments inward from the existing margins. So,

\begin{adjustwidth}{-1cm}{-1cm} % <stuff> \end{adjustwidth} 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.