[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] setting face color for a newcommand

From: sven . bretfeld
Subject: Re: [AUCTeX] setting face color for a newcommand
Date: Sun, 29 Apr 2007 21:27:20 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hi Seweryn

On Sun, Apr 29, 2007 at 03:55:42PM +0200, Seweryn Kokot wrote:
> Hello,
> I created a newcommand with the syntax
> \mycommand{}{}{}
> What I have to do to make the command highlighted together with the
> three curly braces? 

I had the same problem two weeks ago. The best way seems to be:

M-x customize-variable --> font-latex-user-keyword-classes

It's a little tricky in case you have never used the customize
function. You create new entries and values by placing the cursor on
INS and hitting enter. Below is a copy how it should look like, given
your command is called "mycommand". The "Name" can be
anything. "Keywords" is the name of your command without
backslash. "Number of arguments" should be 3 in your case. In the face
attributes you define how Emacs displays the command and the text
within the three arguments. In the example I used only colors: black
for the font, a pale yellow (khaki) for the background (if you are
under GNU/Linux the shell-command showrgb gives you a list of the
available colors). It's important that you hit the button "State"
after you have finished. Hit "1" (save for future sessions) to insert
the new hilighting function to your .emacs.


Font Latex User Keyword Classes: Hide
            Name: the-name-of-my-new-command
            INS DEL Keyword: mycommand
            Choice: Value Menu Face attributes: [ ] Font family: Value
Menu *
                        [ ] Width: Value Menu *
                        [ ] Height: Value Menu *
                        [ ] Weight: Value Menu *
                        [ ] Slant: Value Menu *
                        [ ] Underline: Value Menu *
                        [ ] Overline: Value Menu *
                        [ ] Strike-through: Value Menu *
                        [ ] Box around text: Value Menu *
                        [ ] Inverse-video: Value Menu *
                        [X] Foreground: Value Menu Color: black
                        [X] Background: Value Menu Color: khaki2
                        [ ] Stipple: Value Menu *
                        [ ] Inherit:
            Type: Value Menu Command with arguments:
            Number of arguments: 3
   State: this option has been set and saved.
User-defined keyword classes and specifications for font locking. Hide

> regards,
> Seweryn Kokot
> _______________________________________________
> auctex mailing list
> address@hidden

PS: Bitte schicken Sie mir reine Text-Nachrichten. Bitte schicken Sie
mir keine Word-, PowerPoint- oder Excel-Dateien. Sehen Sie dazu bitte

reply via email to

[Prev in Thread] Current Thread [Next in Thread]