1

I am new to LyX (few weeks) and I am having trouble with line breaks. When I am writing in paragraph mode, I have my text indented (as intended :)), but of I have a long line, LyX doesn't know when to have line break... it makes text go out of indentation (makes lines look out of paragraph "box").

The first two images represent the problem at hand (lyx file and pdf)

The last image represents the wanted indentation (achieved with manually pressing "Enter" before the end of a line).

Any way to make lyx break lines automatically (with right indentation)? Thank you! Lyx file

Broken PDF

OK PDF

  • Hi, welcome. I don't quite understand exactly what you want to do. Paragraph indentation applies to the first line of the paragraph, and its purpose is to mark where a new paragraph starts. When you press enter in LyX, you start a new paragraph (indicated by the pilcrows in your screenshot from LyX). – Torbjørn T. May 2 '18 at 20:07
  • I agree with TorbjørnT. I think you might be confused on the difference between "paragraphs" and "lines". In LyX, whenever you press a simple "Return", you are starting a new paragraph. If you would like to start a new line within a paragraph, you can use "ctrl + return". For control over how indentation (of paragraphs) is done, go to Document > Settings > Text Layout. – scottkosty May 2 '18 at 20:28
1

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 DocumentSettings...Text layoutParagraph separation checkboxes. Once saved the changes, with ViewCode Preview paneComplete source you can see how LateX have changed the two lengths defaults in the preamble of the document.

| improve this answer | |
  • Thank you all! I guess I really got confused... any other kind of layout you would recommend for having the desired result? – Yakir May 3 '18 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.