LyXErroneous linebreak

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
lechuck
Posts: 2
Joined: Sat Jan 16, 2010 3:25 pm

Erroneous linebreak

Post by lechuck »

Hi!

I'm new to LaTeX and LyX... I started writing a Text in LyX using the KOMA-script report class.
But now I stumbled upon a little problem:
One line in a paragraph doesn't seem to break within the boundaries of the justified text. When I change the documentclass back to report, the text looks good again.
I tried to insert \- in some words but that didn't change anything. Also removing the underscores in the last word didn't help.

I created a minimal example and attached it to this thread.

Thanks for your help!
Attachments
rendered output
rendered output
Screenshot.gif (15.75 KiB) Viewed 4168 times
error.zip
the example LyX file
(838 Bytes) Downloaded 181 times
Last edited by lechuck on Sun Jan 24, 2010 12:21 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Re: Erroneous linebreak

Post by Juanjo »

Have you inserted the \- command inside an ERT? I've done so between BO and ARD and I've got a correct break at that point. Perhaps you would like a different break point. But in such a case you should rephrase your text. Likewise, if you would like to use an underscore as the end dash of the line, you could insert after it the command \linebreak (inside ERT).
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
lechuck
Posts: 2
Joined: Sat Jan 16, 2010 3:25 pm

Re: Erroneous linebreak

Post by lechuck »

Hi!

Thanks for your Answer. I used the \linebreak command, because I didn't want the Signalname to be broken apart.
What keeps TeX from breaking the whole word to the next line? Is there a maximum value for the allowable white space between words? And if so, can I edit it in such cases?
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Erroneous linebreak

Post by frabjous »

You could add to the value "\emergencystretch" to increase the amount of whitespace it'll add to a line.

However, the easiest thing is to put it in a sloppy environment, or use the \sloppy declaration.

\begin{sloppy}
Paragraph with overfull boxes goes here.
\end{sloppy}

Or just:

\sloppy

at the beginning of the document.
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Erroneous linebreak

Post by meho_r »

frabjous wrote:You could add to the value "\emergencystretch" to increase the amount of whitespace it'll add to a line.

However, the easiest thing is to put it in a sloppy environment, or use the \sloppy declaration.

\begin{sloppy}
Paragraph with overfull boxes goes here.
\end{sloppy}

Or just:

\sloppy

at the beginning of the document.
I would go with \begin{sloppy}...\end{sloppy}. Putting \sloppy at the beginning of the document isn't such a good idea.

@OP: you should use \linebreak sparingly. At occasions like this, not at all. As frabjous suggested, put an ERT box before that paragraph with problematic line break and type in it: \begin{sloppy}, and after the paragraph put another ERT box and type in it: \end{sloppy}.
Post Reply