In OpenOffice and Microsoft Word it takes seconds to create a new paragraph style. Here is how I currently use LyX with the KOMA Script document class to mark text as a quotation:
- Type some text.
- Click the layouts drop-down.
- Click Quotation.
At this point, the text typed in step 1 is rendered as a quotation. The look of the quotation (for example, adding a border or changing its colour) can be altered by adding code to the preamble. All good here.
The Customization guide for LyX talks about adding a new document class, new styles, new layouts, etc. But the documentation does not say how to create a new text layout (like quotation) and have it show up in the menu.
I could create the new layout in the preamble, then insert LaTeX code before and after the text that I want to stylize. But that seems to run counter to how to wield LyX.
- What is the formal name for the layouts in the drop-down? (Style, layout, template, paragraph style, etc.? It is difficult to search for something when the name seems to have several synonyms.)
- Without copying and pasting KOMA Script's .class file, what are the exact steps needed to add a new layout, such as a "warning" box, and make it available from the LyX drop-down?
- Create a new file called warning.inc.
- Copy the contents from pastebin.com/etc.
- Copy warning.inc into
- Update the document preamble as follows:
- Click Tools » Reconfigure.
- Restart LyX.
- Type some text.
- Click Warning from the drop down.
- Render the PDF to see the text in a box with a red border.
A simple, working example of steps, such as the above, to create a new "paragraph style" would be fantastic. Nearly all the documentation I have read shows how to set up a Document Class and define your own Templates (or Styles). Unless I have misunderstood something, I already have a Document Class: KOMA Script v2. I don't want to copy it (because if a new version is released, I have to merge if I upgrade): I want to extend it.