411223, 358 Iyx- Ad caution and warning massages lo book - TeX - LaTeX Stack Exchange
TeX - LaTeX Stack Exchange is a question and ‘Anybody can ask a question x
answer site for users of TeX, LaTeX, ConTeXt,
and related typesetting systems. It only takes a
minute to sign up. ‘Anybody can answer
TEX
Add caution and warning messages to book
Asked Syears ago Modified 8 years, 11 months ago Viewed 631 times
The best answers are voted up and
rise to the top
‘a [am new to LyX, and am using v2.1.2 with the book class. In addition to help with my specific
questions, | would appreciate any feedback if there is a better way to achieve my desired results.
4. Sorry if this is overly long, | 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.
Ihave 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
Caution: | would like to use a hanging
aph:
etjlj gelj ekjld glegee
Your privacy indows) to the user area, duplicated the
By clicking “Accept s°, you agr hang as shown below (similar styles for
an store cookies on your device and disclose information in ot shown here):
accordance with our Cookie Pol
Accept all cookies Necessar
hntps:tex,stackexchange.comiquestons/215817/adé-cauton-and-waring-messages-to-book 18411223, 358 Iyx Add caution and warning messag
15 to book - TeX - LaTex Stack Exchange
NextWorndent 1
LeftMargin ro
RightMargin mo
Partndent e
Parskip e
Ttensep e
Topsep es
Bottonsep es
Parsep 2
Align aleck
ALignPossible Block, Left, Right, Center
Font
Series Bold
color Black
EndFont
HiMTag blockquote
HIMLrtem div
Preanble
\newenvironment{note}
{\quotation\hangindent=2em\color[ rgb]{1,0.2,8.3){NOTE: }}
‘{\endquotation}
EndPrearble
End
The pdf output is very close to what | 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:
ntps:tex.stackexcnange,comvquestions/215417/add-cauton-and-warring-messages-o-book 21641203, 388 Iyx- Add caution and warning messages lo book - TeX - LaTeX Stack Exchange
‘These safety-related tors appear in this manual
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 ot choice. Statemente identify information that you should consider before
‘moving to the next, instruction or choice.
2
Statements identify information that you should consider before moving to the next instrue-
tion or choice. Statements identify information that you should consider before moving to U
next Instruction or choice. Statements identify information that you should eonsider before mo
Ing to the next instruction or choice.
AUTION: State
age to the equipment, th
tions or pract
software, or other property.
ss that could result in dame
LyX code using ‘Note’ and ‘Caution’:
These safety-related terns appear in this manual:
\begin{note}
Statements identify information that you should consider before moving
to the next instruction om choice. Statenents identify information
‘that you should consider before moving to the next instruction or
d consider before
er before moving
information
truction or
d consider before
Your privacy
By clicking
can store cookies on your device and disc
accordance with our Policy.
Kies", you agree Sta nge result in danage
ormation 9 caution}
to use "Note: " as a prefix to the
‘0 be typed in each time, but rather
not working (1 am just guessing on how
rent code does do this correctly in the
hntps:tex,stackexchange.comiquestons/215817/adé-cauton-and-waring-messages-to-book411223, 358 Iyx- Add caution and warning messages lo book - TeX - LaTeX Stack Exchange
Thank you!
bye
Share Improve this question Follow edited Dec 4, 2014 at 2131 asked Dec 4, 2014 at 2050
6332 zono
Bias
1 Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
Usually we post only a question for each thread, so I would suggest that you choose a main question to
ask in this thread and then ask your other questions in different threads, each of them referencing your
‘original question. ~ Pier Paolo Dec 4, 2014 at 20:58
@Pier Paolo - thank you, | will update in the next few minutes. ~ Zono Dec 4, 2014 at 21:24
1 Answer Sorted by: Highest score (default) *
‘a. With the info provided by scottkosty (Documentation on the arguments used when defining
styles in an_inc file), | was able to figure out how to get the desired output on the LyX screen. The
0 _ style code below was added to a user copy of stdlayouts.inc. The ‘caution’ style is just a variant of
‘note’, made easy by the use of the copystyle command,
style Note
category MainText
Ve static
do anything
creases text area) of paragraph
Your privacy
By clicking “Accept
an store cookies on your device and disclose information in
accordance with our Cookie Pol
hntps:tex,stackexchange.comiquestons/215817/adé-cauton-and-waring-messages-to-book 46411223, 358 Iyx- Add caution and warning messages lo book - TeX - LaTeX Stack Exchange
color Black
EndFont
# html key-value pairs not yet changed to support this style
HTMLTag blockquote
HTMurter a
Preanble
\nenenvironnent {note}
{\quote\be{NOTE: }}
{endquote}
EndPreanble
End
style Caution
Copystyle "Note"
LatexNare caution
Labelstring "CAUTION:
Font
Series Bold
color Red
EndFont
4 html key-value pairs not yet changed to support this style
HIMLTag, blockquote
HIMurter div
Preanble
\newenvironnent {caution}
‘{\quote\bF\color[ ngb]{1,0-2,8.3}{CAUTION: }}
{\endquote}
EndPrearble
End
+ hefore moving tothe next
at you should consider before moving
before moving to the next
Your privacy the digo The mii porered ban 11-18 VDC sree
By clicking "Accept all cookies", you agr
an store cookies on your device and discl
accordance with our Pol
hntps:tex,stackexchange.comiquestons/215817/adé-cauton-and-waring-messages-to-book 56411223, 358 Iyx- Add caution and warning messages lo book - TeX - LaTeX Stack Exchange
‘Those
foty-relnted terms appear in this
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.
Follow the precautions below to ensure your personal safety and prevent damage to the digitizer. The unit
Unresolved Issues
Iwas not able to get hanging indent working, to get the PDF output looking like the LyX GUI
screen shot. The ‘\hangindent=2cm’ command did not seem to do anything. The results are not
perfect, but are close enough for what | need.
The ‘Labelindent’ key did not seem to work. Since it did not, | had to manually set the margins to
look right using the longest label of the 3 | needed (Note, Caution, Warning). Again, not perfect,
but close enough for what I need.
Share Improve this answer Follow answered Dec 8, 2014 at 23:42
Your privacy
By clicking “Accept
an store cookies on your device and disclose information in
accordance with our Cookie Pol
hntps:tex,stackexchange.comiquestons/215817/adé-cauton-and-waring-messages-to-book