4

A while back I ran across a web page that explained how to avoid this error by not using \\ but hfill or hspace. I can't remember which one or find anything else about it. It was a very simple solution and solved the problem without extra packages or anything and simply filled the remaining horizontal space. Any ideas?

14

Although it is difficult to adequately reproduce this warning (not an error), you may be after the UK TeX FAQ entry No line here to end. Here is one such a reproduction of the warning:

\documentclass{article}
\begin{document}
\begin{description}
  \item[Very long label] Some starter text \\
    \\
    Here is some more text.
\end{description}
\end{document}

The problem stems from the use of \\ to insert a blank line. Rather use a vertical skip (like \smallskip, \medskip or \bigskip) or leave a blank line - that would indicate a paragraph break and an associated "blank line". Alternatively, a resolution suggested is to provide an infinite stretch of space \hspace*{\fill} so that there's enough "to go around" for TeX to fill the line before breaking it.

  • Thanks, that was it... Forgot to use \fill. To be clear, it is "\\\hspace*{\fill}". – Uiy May 2 '12 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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