Yann Collete wrote:
>
> Hello again,
>
> I just what to change the background color. For example:
>
> Latex_Tag -> switch background color to light gray
>
> \begin{verbatim}
>
> Some text
>
> \end{verbatim}
>
> Latex_Tag_2 -> switch background color to "normal"
>
> This "method" will allow me to add a minimum of Latex command in ERT.
> It will also allow me to ignore the style of the \begin{} \end{} block
> (quote, verbatim, etc...)
i hope i understand your problem well.
what do you think about this solution:
save the following lyx-layout as ~/.lyx/layouts/color.inc
and add in e.g. ~/.lyx/layouts/stdclass.inc the line
Input color.inc
Save the file and reconfigure lyx, close it and run lyx again.
Now you can choose the style "standard-color" from within lyx.
the following lyx-text appears in blue and will be printed with
gray-background. no ERT, pure LyX ;-)
Herbert
#-------file color.inc voss/001204
# Standard color-style definition
Style Standard-Color
Margin Static
LatexType Environment
LatexName cminipage
ParIndent MM
ParSkip 0.4
Align Block
AlignPossible Block, Left, Right, Center
LabelType No_Label
# standard font definition
Font
color blue
EndFont
Preamble
\usepackage{color,calc}
\definecolor{myColor}{rgb}{0.9,0.9,0.9}% rgb color model
\newenvironment{cminipage}{%
%\setlength{\fboxsep}{-\fboxrule}
\noindent%
\begin{lrbox}{\@tempboxa}%
\begin{minipage}{\linewidth-2\fboxsep}}%
{\end{minipage}%
\end{lrbox}%
\colorbox{myColor}{\usebox{\@tempboxa}}}%
EndPreamble
End
--
[EMAIL PROTECTED]
http://perce.de/lyx/