LaTeX forum ⇒ TeXworksInquire about Underfull \hbox

Information and discussion about TeXworks, an integrated LaTeX environment for several platforms
yaozhao
Posts: 27
Joined: Sat Oct 27, 2018 10:38 pm

Inquire about Underfull \hbox

Postby yaozhao » Mon Nov 12, 2018 10:59 pm

  1. \usepackage{amsmath}
  2. \usepackage{amssymb}
  3. \usepackage[T1]{fontenc}
  4. \usepackage{graphicx}
  5. \DeclareUnicodeCharacter{202F}{\,}
  6.  
  7.  
  8.  
  9. \begin{document}
  10. \title{Problem Set 8 Notes}
  11. \author{Yao Zhao \\ University of Wisconsin-Madison}
  12. \maketitle
  13.  
  14. Some students say there are a lot of concepts. It is true. But these concepts also have very close relationships with each other.
  15.  
  16. \section{Marginal, Average, Total + *}
  17. I denote * here, which means * can be any words and the relatipnships among these three concepts always hold the same. For example, you may see marginal / average / total + product / cost / revenue / profit. All of these concepts have economic explanations. For example, you can refer to my Problem Set 6 Note in Canvas to check the ecnomic meanings of marginal / average / total product. \\
  18.  
  19. Here I am focusing on their relationship mathematically. Specifically, given one function,how to derive the other two concepts?\\


LaTeX gives me such information. I don't understand.

Underfull \hbox (badness 10000) in paragraph at lines 18--19
Underfull \hbox (badness 10000) in paragraph at lines 20--21

User avatar
Stefan Kottwitz
Site Admin
Posts: 9197
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Nov 12, 2018 11:49 pm

LaTeX does justification of text lines, to get a straight left and right margin. You used \\ to end a line, so that line is "underfull" and LaTeX issues a warning.

Using \\ for ending a line is usually not good. I would only use \\ to end lines in tabular, array, align or other multi-line environments, but never for normal text. Normal text has paragraph breaks (done by an empty line), but not line breaks plus paragraph breaks. Remove the \\ at the end of lines.

Stefan
Site admin

yaozhao
Posts: 27
Joined: Sat Oct 27, 2018 10:38 pm

Postby yaozhao » Tue Nov 13, 2018 2:18 am

I see. I still have 2 questions about paragraph breaks.

1st question: the effect of an empty line is totally the same as the effect of several empty lines. Right?

2nd question: what if I want to have an empty line space between two paragraphs?

User avatar
Johannes_B
Site Moderator
Posts: 3905
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Nov 13, 2018 8:18 am

You are right, you can put as many blank lines as you want. For TeX, it is just one paragraph break.

If you want to have a blank line between paragraphs, use package parskip.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9197
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Nov 13, 2018 2:18 pm

It's done this way:

\usepackage{parskip}

And remove the \\ at line ends.

So, full example:

  1. \documentclass{article}
  2. \usepackage{parskip}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage{amsmath}
  5. \usepackage{amssymb}
  6. \usepackage[T1]{fontenc}
  7. \usepackage{graphicx}
  8. \DeclareUnicodeCharacter{202F}{\,}
  9.  
  10.  
  11.  
  12. \begin{document}
  13. \title{Problem Set 8 Notes}
  14. \author{Yao Zhao \\ University of Wisconsin-Madison}
  15. \maketitle
  16.  
  17. Some students say there are a lot of concepts. It is true. But these concepts also have very close relationships with each other.
  18.  
  19. \section{Marginal, Average, Total + *}
  20. I denote * here, which means * can be any words and the relatipnships among these three concepts always hold the same. For example, you may see marginal / average / total + product / cost / revenue / profit. All of these concepts have economic explanations. For example, you can refer to my Problem Set 6 Note in Canvas to check the ecnomic meanings of marginal / average / total product.
  21.  
  22. Here I am focusing on their relationship mathematically. Specifically, given one function,how to derive the other two concepts?
  23. \end{document}


Stefan
Site admin


Return to “TeXworks”

Who is online

Users browsing this forum: No registered users and 1 guest