In the layout/module file format of LyX, is there any method to produce a paragraph style, that renders and exports like


The purpose would be to create layouts, where \paragraphs look as they would in the printed document.

I am aware, that a Style Paragraph exists by default, but I am specifically looking for making the interface more WYSIWYG-like, in order to improve visual clarity. When deeply nested elements occur, especially beyond secnumdepth, it is hard to tell for the formatting if an element is on a higher or lower nesting level. (Added as clarification after Torbjørn's answer)

LyX "Style" definitions have an option

LabelType manual

A style

Style CustomParagraph
  Category Sectioning
  LabelType manual
  LatexType command
  LatexName paragraphx
    Series bold
  LeftDelim "<br/>"
  RightDelim "<br/>"

would render the words until the first space bold (non-breaking spaces can be used to render multiple words bold), and export as


While this works, it is ugly. I much rather would have the style exported as


and avoid the auxiliary command \paragraphx[]{}.


Depending on the document class, there should be a Paragraph style by default, is there anything wrong with that?

(The screenshots are from an older version of LyX, as that is what I had available, but I'd expect the same in the latest version.)

enter image description here

enter image description here

  • 1
    I think that the OP want to see a more WYSIWYG LyX screen, with "foobar stuff" in the same line, since in this way will be showed in the PDF in standard classes, whereas as you showed, by default show the paragraphs just like a \subsubsection* – Fran Oct 31 '18 at 0:00
  • Well, as far I can see there are a little more space after a \subsubsection* that after a \paragraph, but certainly it could be a mess work with several of these levels without check everytime the outline pane. – Fran Oct 31 '18 at 0:12
  • @Fran I see, you're probably right. I'll leave it for now, but will delete it later if the OP thinks it's worthless. – Torbjørn T. Oct 31 '18 at 6:14
  • It's fine to keep the answer; I should have clarified that I know about the default paragraph style. But @Fran is right, I am mostly looking to make sectioning more WYSIWYG, as the defaults can result in inconvinient visual clutter. This is especially true for flex insets. – kdb Nov 1 '18 at 9:13

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.