Quantcast
Viewing latest article 1
Browse Latest Browse All 5

Answer by Will Robertson for Difference between \textwidth, \linewidth and \hsize

I think the simplest way to describe the difference is as follows:

  • \hsize is a TeX primitive that should not be usually used in LaTeX
  • \textwidth is the (constant) width of the total text block
  • \columnwidth is the (constant) width of a single column of text
    (which is the same as \textwidth for a single column document)
  • \linewidth is a variable that represents the current size of the line of text, whether inside a column or a minipage or a list

In general, then, it's best to always use \linewidth if you are specifying the relative size of an image or a box, since it will adapt to the current situation.

Note: \linewidth also appears to work in table columns, not just text columns. See this answer for an example where a fixed-width parbox is used within a table cell (actually a multirow cell).


Viewing latest article 1
Browse Latest Browse All 5


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>