Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I can't find the reason for getting this message:

Underfull \hbox (badness 10000) in paragraph

This is my test case:

\newcommand{\ruler}{\noindent\rule[1ex]{\textwidth}{1pt}\\}
\newcommand{\rulercap}[1]{\ruler{\Large #1\hfill\\}\ruler}

\rulercap{test caption}
share|improve this question
add comment

1 Answer

Your second call to \ruler ends with a linebreak, but the line is empty, which creates an underfull hbox. Do this instead:

\newcommand{\ruler}{\noindent\rule[1ex]{\textwidth}{1pt}}
\newcommand{\rulercap}[1]{\ruler\\{\Large #1\hfill\\}\ruler}

\rulercap{test caption}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.