63

Sometimes I find that floats don't fit nicely on a page, so I use

\resizebox{\textwidth}{!}{ <blah blah blah> }

so that the borders match the margins. However, I'm now working on a paper in two-column format (specifically using sigplanconf.cls) and if I use the above command, it stretches the table over both columns.

Is there a way I can find the "proper" \textwidth? As in, a variable that describes the width of a single column.

CampanIgnis
  • 4,624
Douglas S. Stones
  • 927
  • 1
  • 7
  • 11

2 Answers2

71

Rather than \columnwidth, the appropriate length to use is \linewidth, which will either be \columnwidth in two-column mode or \textwidth in one-column mode.

  • 3
    In ConTeXt, the value for \textwidth seems to take into consideration columns automagically. There appears to be no \linewidth value. – Dave Jarvis Aug 21 '13 at 03:31
70

Try \columnwidth as a drop-in replacement for \textwidth.

David Z
  • 12,084
  • 7
  • 48
  • 65