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.

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?

share|improve this question
3  
    
I saw that, it isn't what I'm talking about.... –  Uiy May 2 '12 at 2:56
10  
I downvoted your question, because I would suppose a user with 40 asked questions and 800 reputation to know how to ask a question. Your question is tough to answer, but not becuase the question is complicated, but the question is not properly written. You should have provided a minimal example, maybe some image of the page output or so. –  yo' May 2 '12 at 7:17

1 Answer 1

up vote 13 down vote accepted

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.

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

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.