colors in environments
Sergio Celani
sergiocelani at gmail.com
Tue Aug 6 23:32:14 UTC 2024
El mar, 6 ago 2024 a las 16:02, Herbert Voss (<Herbert.Voss at fu-berlin.de>)
escribió:
>
>
> Am 06.08.24 um 17:06 schrieb Richard Kimberly Heck:
> > On 8/6/24 8:56 AM, Sergio Celani wrote:
> >> Hello
> >>
> >> I need to modify or create a new module so that the environments
> >> 'theorem', 'lemma', 'proposition', etc., appear in a different color.
> >> For example, I'd like to modify the 'theorems-ams.module' file so
> >> that the colors of the environments change in the generated LaTeX
> >> file. I only want to change the color of the label and number, not
> >> the content. Is there an easy way to do this?
>
> If you do not need the color inside LyX z´then you need
> only these commands in the preamble (here only shown for Lemma):
>
> \usepackage{xcolor}
>
> \AtBeginDocument{%
>
> \renewcommand\lemmaname{\textcolor{red}{\bfseries\Large Lemma}}%
>
> \renewcommand\thethm{\textcolor{red}{\bfseries\Large\arabic{thm}}}%
>
> }
>
> If you want it also inside LyX, then create a new layout file
> and set the color, e.g. for Lemma in theorems-ams.inc
>
> Style Lemma
> CopyStyle Theorem
> DependsOn Theorem
> LatexName lem
> LabelString "Lemma \thetheorem"
> LabelFont
> color red
> endFont
> ...
>
>
> Attached the LyX view and pdf output for the amsarticle class.
>
> Herbert--
> lyx-users mailing list
> lyx-users at lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
Perfect, it's just what I needed. Thank you very much.
Sergio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240806/af66fcaf/attachment.html>
More information about the lyx-users
mailing list