[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] setting same color for math scripts as other math
From: |
Tamas Papp |
Subject: |
Re: [AUCTeX] setting same color for math scripts as other math |
Date: |
Thu, 16 Mar 2017 10:22:02 +0100 |
User-agent: |
mu4e 0.9.19; emacs 25.1.1 |
Hi Mosè,
On Wed, Mar 15 2017, Mosè Giordano wrote:
> To copy a specific attribute (foreground in this case) you can use
> something like
>
> --8<---------------cut here---------------start------------->8---
> (with-eval-after-load "font-latex"
> (set-face-attribute 'font-latex-script-char-face nil
> :foreground (face-attribute 'font-latex-math-face
> :foreground)))
> --8<---------------cut here---------------end--------------->8---
>
> or replace the `(face-attribute ...)' with the color you like.
>
> I don't know if there is something simpler. You can inherit an entire
> face with `:inherit` attribute, but that doesn't override other
> attributes already set.
Thanks for the help. It turns out that I was solving a non-problem: I
was using latex-pretty-symbols, which would replace _2 with ₂
(visually), which would then inherit the colors of the _. Belatedly I
realized that font-latex-script-char-face is only supposed to color the
_^ chars, not the actual script. So now it is better out of the box.
Since others also have a problem with DarkRed, perhaps in this line
http://git.savannah.gnu.org/cgit/auctex.git/tree/font-latex.el#n1188
it could be replaced with something more subdued than "burlywood", eg
"peru".
Best,
Tamas