I have some Algorithmic sections, which are written externally in LaTeX and included as file includes in my LyX document. The algorithmic section renders with line breaks before and after, but appears inline in the LyX document. Question: Is there a way to insert dummy / editor-only line breaks in LyX? Analagous to the way one can write


instead of

hello world

in LaTeX source, and the result will be the same.

I can't press "enter" or "ctrl+enter" (ragged line break, \\) before or after the figure, since that will create a new paragraph, which will be indented (I don't want this).

Below is a screenshot; the black section "procedure reduce_hla..." is the thing that I want editor-only newlines before and after.

enter image description here

  • 1
    Ctrl + Enter won't create a new paragraph and cause indentation. If you do start a new paragraph, you could edit the paragraph settings (right click in the paragraph) and set it to not be indented. Oct 14 '11 at 7:18
  • Surely the whole point of using LyX is that it is quasi-WISYWYG? Oct 14 '11 at 11:47
  • 1
    @Brent.Longborough, but, it isn't being WYSIWYM, the real LaTeX has line breaks around the algorithm, LyX doesn't. Oct 14 '11 at 18:42
  • You could add \par before and after the algorithm, and then remove any paragraph indentation by using \noindent. Does that work for you?
    – Werner
    Jan 2 '12 at 7:15
  • Somewhat related? tex.stackexchange.com/questions/40447/… Jan 8 '12 at 22:16

Browse other questions tagged or ask your own question.