Text Formattingconfused about \linewidth

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

confused about \linewidth

Post by ghostanime2001 »

I am confused about \linewidth. Some documents say it is the width of the current line in the current font. Do they mean the width of a sentence using the current text ? The definition seems too vague
Last edited by cgnieder on Tue Jan 22, 2013 11:43 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

confused about \linewidth

Post by Stefan Kottwitz »

It's the width of the current line, that's correct. I would not speak about the font or a sentence. Changing the font or writing a longer sentence doesn't change the line width.

In a basic case, \linewidth means the width between the left margin and the right margin, so can be equal to \textwidth in a simple situation. However, in some situations the line is shorter, so \linewidth would have a smaller value, for example in lists such as itemize, enumerate and description, as you can imagine it would get even smaller within nested lists. It's the space which you can use on that line.

Stefan
LaTeX.org admin
Post Reply