I am new to LyX, and am using v2.1.2 with the book class. In addition to help with my specific questions, I would appreciate any feedback if there is a better way to achieve my desired results. Sorry if this is overly long, I was not sure how to break it into smaller posts given the background information necessary to understanding the problems.
My ability to get this far was greatly aided by Create new paragraph style in LyX on this web site.
I have made several new environments based on 'quotation' to set notice, caution, and warning messages apart from normal paragraphs, to emphasize them in a user manual. These special paragraphs have wider margins, may have bold text, may have different color text, and will begin with a label of the type of message: 'Note:', 'Warning:', 'Caution:'. I would like to use a hanging indent so the label stands alone to the left of the paragraph:
Note: Efdfd gdgfdf dgdfd dfere dfere geef geeds etjlj gelj ekjld glegee
ljkjlj ekek eskie ekeke.
I have moved stdlayouts.inc from the programs area (Windows) to the user area, duplicated the 'Quotation' style, and modified it into a new style 'Note' as shown below (similar styles for 'Caution' and 'Warning' have also been added but are not shown here):
Style Note
Category MainText
Margin Static
LatexType Environment
LatexName note
LabelString "NOTE: "
NextNoIndent 1
LeftMargin MMM
RightMargin MMM
ParIndent 0
ParSkip 0
ItemSep 0
TopSep 0.5
BottomSep 0.5
ParSep 0.2
Align Block
AlignPossible Block, Left, Right, Center
Font
Series Bold
Color Black
EndFont
HTMLTag blockquote
HTMLItem div
Preamble
\newenvironment{note}
{\quotation\hangindent=2cm\color[rgb]{1,0.2,0.3}{NOTE: }}
{\endquotation}
EndPreamble
End
The pdf output is very close to what I want. The wider margins, bold font, and color are all working, but the hanging indent is not. Also, the second 'note' paragraph is the same color as the following 'caution' paragraph rather than the color of the first 'note' paragraph.
'Note' and 'Caution' PDF Output:
LyX code using 'Note' and 'Caution':
These safety-related terms appear in this manual:
\begin{note}
Statements identify information that you should consider before moving
to the next instruction or choice. Statements identify information
that you should consider before moving to the next instruction or
choice. Statements identify information that you should consider before
moving to the next instruction or choice.
Statements identify information that you should consider before moving
to the next instruction or choice. Statements identify information
that you should consider before moving to the next instruction or
choice. Statements identify information that you should consider before
moving to the next instruction or choice.\end{note}
\begin{caution}
Statements identify conditions or practices that could result in damage
to the equipment, the software, or other property.\end{caution}
Question: In the 'note' style I tried to add a LabelString to use "Note: " as a prefix to the paragraph in the LyX display, so that it would not need to be typed in each time, but rather added automatically by selecting the 'note' style. This is not working (I am just guessing on how to do this). Is this possible, and if so, how? The environment code does do this correctly in the pdf output.
Thank you!