From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.help Subject: Re: modify syntax highlighting in auctex Date: Tue, 02 Aug 2005 14:32:00 +0200 Organization: Dept. of Theoretical Physics, University of Ulm Message-ID: References: Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1122993245 1626 80.91.229.2 (2 Aug 2005 14:34:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2005 14:34:05 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 02 14:33:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dzvwf-0001rM-Lx for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Aug 2005 14:32:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DzvzM-00043d-5r for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Aug 2005 08:35:20 -0400 Original-Newsgroups: gnu.emacs.help X-Face: :6KQZ[nyoS_edmB.%gw-=)BYth^|2+Y+^cu%I$FSx!&>-'om>3H7A|M&n(V7fIo3P.; yo.b yq4$p; ZaBtkv)\}biaiBQe"mD}iib1AA@99-fZ7i*bLhNRVC&0Wkxg9)SH?oWc@{ Mail-Copies-To: nobody User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:0jM6xHdC5+dMcSJ0F2z1xcA0ngo= Original-NNTP-Posting-Host: bridgekeeper.physik.uni-ulm.de Original-X-Trace: news.uni-ulm.de 1122985927 134.60.10.123 (2 Aug 2005 14:32:07 +0200) Original-Lines: 58 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed.news.tiscali.de!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!inka.de!rz.uni-karlsruhe.de!news.uni-ulm.de!bridgekeeper.physik.uni-ulm.de!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:132835 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28345 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28345 On Tue, Aug 02 2005, Fabian Braennstroem wrote: > all I want to modify syntax highlighting in auctex for the > use of beamer documents. Each frame/slide starts with the keyword > 'frametitle' and now I want that is has the same style like the > 'subsection' keyword, but with a different color, e.g. > green. [...] > Maybe, it is even possible to change the color of the words > frame and framtitle and enlarge and color the title-text!? The following patch (against current CVS [1]) for style/beamer.sty enables \subsection-like highlighting of \frametitle: --8<---------------cut here---------------start------------->8--- --- beamer.el 26 Mar 2005 19:31:54 +0100 1.9 +++ beamer.el 02 Aug 2005 14:05:41 +0200 @@ -109,7 +109,14 @@ env (let ((width (read-input "(Optional) Area width: "))) (unless (zerop (length width)) - (format "[%s]" width))))))))) + (format "[%s]" width))))))) + + ;; Definitions for font-latex + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; Textual keywords + (add-to-list 'font-latex-match-sectioning-3-keywords-local "frametitle") + (font-latex-match-sectioning-3-make)))) (defun TeX-arg-beamer-overlay-spec (optional &optional prompt) "Prompt for overlay specification." --8<---------------cut here---------------end--------------->8--- You may also add your own keywords as the manual suggests, but this is done no matter if you actually use the beamer class or not: ,----[ (info "(auctex)Font Locking") ] | You can add your own sectioning commands be adding them to the | keyword lists: `font-latex-match-sectioning-0-keywords' | (`font-latex-sectioning-0-face') ... | `font-latex-match-sectioning-5-keywords' | (`font-latex-sectioning-5-face'). `---- I.e. (setq font-latex-match-sectioning-3-keywords (list "frametitle")) should do the trick, see `C-h v font-latex-match-sectioning-3-keywords RET' for more. Bye, Reiner. [1] probably it wont work with AUCTeX <= 11.55 because some functions have been renamed. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/