TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm recieving seemingly random There's no line here to end errors at different parts in my code. At first I thought they were truly random and that I had some weird configuration error somewhere, but after more thorough investigations I have found that the error occurs when a page break and an extra line break within a paragraph coincide.

For example, if I have a paragraph containing an eqnarray* environment, and the entire paragraph does not fit on the page (so that the page breaks in the middle of the paragraph, usually between a line of text and the eqnarray*), I get the error.

Does anyone have any idea why this happens?

share|improve this question
Avoid eqnarray, better use align of the amsmath package. You probably have misplaced \\ check if you really need this there. Perhaps show the relevant piece of code. – Stefan Kottwitz Dec 9 '11 at 7:51
Have a look at Error message: There's no line here to end, and please tell us if that helped. We would close this question as a duplicate then. – Stefan Kottwitz Dec 9 '11 at 8:03
do you have a blank line or \` before the eqnarray`? either of those is a bad idea. in fact, it's a bad idea before any display material; in math composition, for good style it is recommended that at least one text line appear at the top of a page before a display, to provide continuity for the reader. – barbara beeton Dec 9 '11 at 14:07
up vote 3 down vote accepted

It turned out this wasn't at all related to any code I had in my actual document, but to a header definition I use in a package I've authored myself. If some fields where empty, some parts of the header ended up with two \\ following directly on each other. The first page had \maketitle on it, and thus didn't print out the header area, so the error didn't occur until LaTeX tried to create the second page - completely unrelated to what was in the document at the pagebreak.

Lessons learned:

  • When things go wrong at page breaks, don't only check the document itself - also check the header and footer definitions.

  • When authoring your own packages, make sure they don't make any unrealistic assumptions, such as "the document author will always want a subtitle"...

share|improve this answer

Your Answer


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.