www.delorie.com/gnu/docs/emacs/gnus_95.html   search  
 
Buy the book!


Gnus Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.16.2 Article Fontisizing

People commonly add emphasis to words in news articles by writing things like `_this_' or `*this*' or `/this/'. Gnus can make this look nicer by running the article through the W e (gnus-article-emphasize) command.

How the emphasis is computed is controlled by the gnus-emphasis-alist variable. This is an alist where the first element is a regular expression to be matched. The second is a number that says what regular expression grouping is used to find the entire emphasized word. The third is a number that says what regexp grouping should be displayed and highlighted. (The text between these two groupings will be hidden.) The fourth is the face used for highlighting.

 
(setq gnus-article-emphasis
      '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
        ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))

By default, there are seven rules, and they use the following faces: gnus-emphasis-bold, gnus-emphasis-italic, gnus-emphasis-underline, gnus-emphasis-bold-italic, gnus-emphasis-underline-italic, gnus-emphasis-underline-bold, and gnus-emphasis-underline-bold-italic.

If you want to change these faces, you can either use M-x customize, or you can use copy-face. For instance, if you want to make gnus-emphasis-italic use a red face instead, you could say something like:

 
(copy-face 'red 'gnus-emphasis-italic)

If you want to highlight arbitrary words, you can use the gnus-group-highlight-words-alist variable, which uses the same syntax as gnus-emphasis-alist. The highlight-words group parameter (see section 2.10 Group Parameters) can also be used.

See section 4.3 Customizing Articles, for how to fontize articles automatically.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003