auctex
[Top][All Lists]
Advanced

[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.

Greetings,
Sven

Font Latex User Keyword Classes: Hide
INS DEL List:
            Name: the-name-of-my-new-command
            Keywords:
            INS DEL Keyword: mycommand
            INS
            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
(sample)
                        [X] Background: Value Menu Color: khaki2
(sample)
                        [ ] Stipple: Value Menu *
                        [ ] Inherit:
                            INS
            Type: Value Menu Command with arguments:
            command
            Number of arguments: 3
INS
   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
> http://lists.gnu.org/mailman/listinfo/auctex

-- 
PS: Bitte schicken Sie mir reine Text-Nachrichten. Bitte schicken Sie
mir keine Word-, PowerPoint- oder Excel-Dateien. Sehen Sie dazu bitte
auch http://www.gnu.org/philosophy/no-word-attachments.de.html.




reply via email to

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