LyX ⇒ How to create new environment in Lyx?
How to create new environment in Lyx?
I am using a layout based on the Article class. It is missing a paragraph style (environment) that I really need.
This would be an environment similar to the ones called Paragraph or Subparagraph. It would appear in the bookmarks, but unnumbered and at any point in the hierarchy. It would be similarly bolded.
However, when followed by another paragraph in the Standard environment, it would not be inline, but the Standard paragraph would start on a new line.
Ideally, the new style might also have a fancy graphical bullet, like an arrow or a pointing hand.
The purpose of this environment is to define the titles of procedures in technical manuals. For example,
To create the database model
This is normally followed by a numbered list of steps. Using the Enumerate environment, I get the look I want, but if there is only one step in the procedure, it looks silly to have a numbered list with only one item.
Also, I need a separate Environment for this because that should make it easier to parse the document on it, if ever I get into single-sourcing with XML, for example.
It would also be useful to be able to create a TOC of just the paragraphs in this style, with their page numbers (IOW, a lookup table of procedure titles). I'm used to doing that in FrameMaker but trying laboriously to convert to Lyx in my new firm. Can this be done?
Thanks for guidance. I'm still quite a newbie.
EFR
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
How to create new environment in Lyx?
I've got something approximating what I want by adding the following in my Local Layout:
Code: Select all
Format 35
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[book]{mybook}
Input stdclass.inc
Preamble
\newenvironment{ProcTitle}{%
\topskip 10in
~\\\\
\bf
\large
\sffamily
{>>}
}
EndPreamble
Style ProcTitle
CopyStyle Paragraph
LatexType Environment
LatexName ProcTitle
LabelString ">>"
End
Also, what is the meaning of the first two lines?
Code: Select all
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[book]{mybook}
I know I need to transfer the Preamble part to the class and the Style ProcTitle part to our layout, but I will wait to see if I can't improve on this before going ahead.
Thanks for any pointers and advice. I know this is a Frequently Asked Question (indeed, I mself have asked it before) but I can't find any clear guidelines on how to create new environments in Lyx. For example, I have an old O'Reilly LaTeX guide, but I try things out from there and they don't seem to have any effect on my output. I tried using parskip instead of ~\\\\ above but nothing showed.
Ta,
EFR