Tell me more ×
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 have been adding manual line breaks to paragraphs in my document using the \linebreak command because I have been suffering badly from overfull horizontal boxes. However when I compile my document the line number in the console and log associated with any errors I have is now wrong (by the number of \linebreak commands occurring before it in the document).

At present this is manageable, however the more line breaks I use the harder it will be to trackdown errors.

I have tried using \beginsloppypar{ for the whole section however every time I compile the document using this environment I get an extra nonsense error that has to be skipped - not viable for a Thesis being compiled hundreds of times.

The problem arises because of the inclusion of chemical names.

I am using MiKTeX 2.9 Version 0.4.1 r827.

p.s. You guys are awesome, most of my questions are answered here before I have to ask them!

share|improve this question
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Fran Feb 5 at 2:27
A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). – Fran Feb 5 at 2:34
In my extensive experience, bad line breaking by (La)TeX happens only for narrow columns, or overlong material inline (equations?). Where it gets annoying I move equations into displays, or try rewording the paragraph to get better line breaks (has helped in forcing me to fix bad writing style too ;-) – vonbrand Feb 5 at 2:35
1  
The line number in the console has only to do with the lines in the source file, not in the printed output; I can't see how \linebreak can influence this, because the line numbers you see on the terminal are computed much earlier than when \linebreak is interpreted by TeX. – egreg Feb 5 at 7:43

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.