Andrew Sullivan wrote:
Hi,
I know how to change the colour of greyed-out notes, but I'd like to
be able to change the font family for them all. Even if I change the
colour to blue, when people print it the blue shows up as grey, and it
doesn't stand out enough from the rest of the page.
Actually, rather than ask for a specific solution (interesting as this
one is to me), maybe I'll describe what I'm trying to do. I'm
attempting to use the greyed-out text to highlight things that need
addressing in a document. So open questions go into greyed-out notes
that are also, as it happens, in a branch of the document. This way I
can always get a "clean" copy or a copy with these open questions in.
Since there didn't seem to be a fast, cheap, and easy way to define
the body text properties for things in one branch and not another, I
thought I'd use the greyed-out notes and just put them all in one
branch. This works, but the notes are still not distictive enough in
printed copies. Since I'm working with some people who often mark up
on paper, I need something that will be obvious when printed.
Clue sticks much appreciated. If I've overlooked something obvious
that I should have read, please feel free to raspberry me. Thanks.
I'm guessing that you are just redefining the font color, etc, for
display in LyX, rather than redefining the LaTeX. The two are separate.
LyX inserts this into the preamble for greyed-out notes:
%% The greyedout annotation environment
\newenvironment{lyxgreyedout}{\textcolor[gray]{0.8}\bgroup}{\egroup}
So what you need to do is put something like this into your preamble:
\renewenvironment{lyxgreyedout}{\textcolor{blue}\bgroup}{\egroup}
Untested, but it should work.
A better way to go is to define a custom flex inset in a module. Then
you can use it in lots of different documents. Something like this:
#\DeclareLyXModule{bluenote}
#DescriptionBegin
#Adds a blue note inset.
#DescriptionEnd
Format 11
InsetLayout Custom:Bluenote
LyXType custom
LatexName bluenote
LatexType environment
Decoration classic
Font
Color blue
EndFont
MultiPar true
LabelString Important
Preamble
# Of course, you can do anything you like here.
\newenvironment{bluenote}{\textcolor{blue}\bgroup}{\egroup}
EndPreamble
End
Save this as bluenote.module in your layout directory, reconfigure, and
choose it in Document>Settings>Modules. You'll then find it under
Insert>Custom Insets. If you want to bind a key to it, bind it to:
flex-insert "Custom:bluenote"
And now you have a blue note inset for easy use in any document.
Richard