There are not any problem with line breaks, but as Torbjørn explained, by default the first line of each paragraphs is indented by a length defined in \parindent
. This is to show where a paragraphs start, with some exceptions. For instance, stand out the start of the paragraph have no sense in first paragraphs of a section or after a list, although it is a matter of style that may change with the document class and/or the language used.
With very short paragraphs apparently this produce a messy right margin, but if you make make several paragraphs of several lines each you will see that all is perfect in the PDF. Note that line breaks of the LyX screen have nothing to do with the real margins in the PDF but with the actual window size. LyX is not a WYSIWYG program!
You can reduce \parindent
to 0pt
that produce the "desired ouptupt", but is a very bad idea as then nothing will show the beginning of the paragraphs ... unless if you highlight the change of paragraph with some vertical space (\parskip
).
The \parindent
and \parskip
lengths in LyX are controlled via menu in Document → Settings... → Text layout → Paragraph separation checkboxes. Once saved the changes, with View → Code Preview pane → Complete source you can see how LateX have changed the two lengths defaults in the preamble of the document.