* modify syntax highlighting in auctex
@ 2005-08-02 10:47 Fabian Braennstroem
2005-08-02 11:34 ` Ralf Angeli
2005-08-02 12:32 ` Reiner Steib
0 siblings, 2 replies; 9+ messages in thread
From: Fabian Braennstroem @ 2005-08-02 10:47 UTC (permalink / raw)
Hi,
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.
I found in 'font-latex.el' the part where 'subsection' is
defined and tried to add:
("title-3" ("frametitle")
font-latex-title-3-face 2 (command 1 t))
to change the style to my own config, but it doesn't work.
There is probably another part where subsection is somehow
defined.
The whole frame-environment looks like:
\frame
{
\frametitle{ something }
some text
}
Maybe, it is even possible to change the color of the words
frame and framtitle and enlarge and color the title-text!?
Greetings, Fabian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: modify syntax highlighting in auctex
2005-08-02 10:47 modify syntax highlighting in auctex Fabian Braennstroem
@ 2005-08-02 11:34 ` Ralf Angeli
2005-08-02 12:32 ` Reiner Steib
1 sibling, 0 replies; 9+ messages in thread
From: Ralf Angeli @ 2005-08-02 11:34 UTC (permalink / raw)
* Fabian Braennstroem (2005-08-02) writes:
> all I want to modify syntax highlighting in auctex
The manual explains how to do this, see (info "(auctex)Font Locking").
--
Ralf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: modify syntax highlighting in auctex
2005-08-02 10:47 modify syntax highlighting in auctex Fabian Braennstroem
2005-08-02 11:34 ` Ralf Angeli
@ 2005-08-02 12:32 ` Reiner Steib
2005-08-02 12:59 ` Ralf Angeli
2005-08-03 9:38 ` modify syntax highlighting in auctex Fabian Braennstroem
1 sibling, 2 replies; 9+ messages in thread
From: Reiner Steib @ 2005-08-02 12:32 UTC (permalink / raw)
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/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: modify syntax highlighting in auctex
2005-08-02 12:32 ` Reiner Steib
@ 2005-08-02 12:59 ` Ralf Angeli
2005-08-02 16:00 ` Reiner Steib
2005-08-03 9:38 ` modify syntax highlighting in auctex Fabian Braennstroem
1 sibling, 1 reply; 9+ messages in thread
From: Ralf Angeli @ 2005-08-02 12:59 UTC (permalink / raw)
* Reiner Steib (2005-08-02) writes:
> The following patch (against current CVS [1]) for style/beamer.sty
> enables \subsection-like highlighting of \frametitle:
[...]
> + (add-to-list 'font-latex-match-sectioning-3-keywords-local "frametitle")
Do other LaTeX classes for producing slides have special macros for
titles as well? In this case we could add a new keyword class for
such titles instead of using an arbitrary level from the sectioning
keyword classes. Because in the latter case one would screw up the
size hierarchy of sectioning keyword classes if one wanted to have the
titles in slides be fontified in a different size.
--
Ralf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: modify syntax highlighting in auctex
2005-08-02 12:59 ` Ralf Angeli
@ 2005-08-02 16:00 ` Reiner Steib
2005-08-03 9:35 ` Fontification of titles in LaTeX slides (was: modify syntax highlighting in auctex) Ralf Angeli
0 siblings, 1 reply; 9+ messages in thread
From: Reiner Steib @ 2005-08-02 16:00 UTC (permalink / raw)
On Tue, Aug 02 2005, Ralf Angeli wrote:
> * Reiner Steib (2005-08-02) writes:
[ sectioning-3-keywords for \frametitle ]
> Do other LaTeX classes for producing slides have special macros for
> titles as well?
Don't know. I only use beamer for slides.
> In this case we could add a new keyword class for such titles
> instead of using an arbitrary level from the sectioning keyword
> classes.
I agree that it is arbitrary.
A different approach would be to defcustom a new variable (say
LaTeX-beamer-frametitle-sectioning-level) specifying the level.
[ Should we shift this to AUCTeX-devel? ]
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Fontification of titles in LaTeX slides (was: modify syntax highlighting in auctex)
2005-08-02 16:00 ` Reiner Steib
@ 2005-08-03 9:35 ` Ralf Angeli
0 siblings, 0 replies; 9+ messages in thread
From: Ralf Angeli @ 2005-08-03 9:35 UTC (permalink / raw)
Cc: help-gnu-emacs
* Reiner Steib (2005-08-02) writes:
> On Tue, Aug 02 2005, Ralf Angeli wrote:
>
>> * Reiner Steib (2005-08-02) writes:
> [ sectioning-3-keywords for \frametitle ]
>
>> Do other LaTeX classes for producing slides have special macros for
>> titles as well?
>
> Don't know. I only use beamer for slides.
What I found with help of
<URL:http://www.miwie.org/presentations/presentations.html>:
beamer: \frametitle
foiltex: \foilhead
(HA-)prosper: integrated in \begin{slide}{<title>}
pdfscreen: \title
rayslides: \newslide
seminar: none
slidenotes: integrated in \begin{slide}[<title>]
TeXpower: \foilhead
>> In this case we could add a new keyword class for such titles
>> instead of using an arbitrary level from the sectioning keyword
>> classes.
>
> I agree that it is arbitrary.
>
> A different approach would be to defcustom a new variable (say
> LaTeX-beamer-frametitle-sectioning-level) specifying the level.
A little better, but still ... if somebody wanted the titles to be
green, like Fabian?
> [ Should we shift this to AUCTeX-devel? ]
Yes.
Crosspost & Followup-To: gmane.emacs.auctex.devel
(I hope that Gmane will insert a correct Mail-Followup-To header. If
it doesn't, please make sure manually that replies are directed to the
AUCTeX mailing list.)
--
Ralf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: modify syntax highlighting in auctex
2005-08-02 12:32 ` Reiner Steib
2005-08-02 12:59 ` Ralf Angeli
@ 2005-08-03 9:38 ` Fabian Braennstroem
2005-08-03 18:56 ` Reiner Steib
1 sibling, 1 reply; 9+ messages in thread
From: Fabian Braennstroem @ 2005-08-03 9:38 UTC (permalink / raw)
Hi to both,
On 2005-08-02, Reiner Steib <reinersteib+from-uce@imap.cc>
wrote:
> 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.
Thanks! Somehow, both example don't work. The patch probably
just because I patched the beamer.el by hand; I will try the
correct way. Using the no-patch variant nothing happens and
when I try to describe variables with 'C-h v ' I just find
'font-latex-match-sectioning-3-keywords'; there are no other
sectioning variables available!?
>
> Bye, Reiner.
>
> [1] probably it wont work with AUCTeX <= 11.55 because some functions
> have been renamed.
Aeh, just found that I use auctex 11.52 ... I actually
already installed 11.55, but this happens when mixing two
different package manager (archlinux and gentoo); stupid. I
will clean up my system and try it again.
Greetings, Fabian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: modify syntax highlighting in auctex
2005-08-03 9:38 ` modify syntax highlighting in auctex Fabian Braennstroem
@ 2005-08-03 18:56 ` Reiner Steib
2005-08-04 13:35 ` Fabian Braennstroem
0 siblings, 1 reply; 9+ messages in thread
From: Reiner Steib @ 2005-08-03 18:56 UTC (permalink / raw)
On Wed, Aug 03 2005, Fabian Braennstroem wrote:
> On 2005-08-02, Reiner Steib <reinersteib+from-uce@imap.cc> wrote:
[...]
>> 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.
>
> Thanks! Somehow, both example don't work.
For AUCTeX <= 11.55 (including 11.55!) it should work with...
(setq font-latex-match-title-3-keywords (list "frametitle"))
[...]
> Aeh, just found that I use auctex 11.52 ... I actually
> already installed 11.55, but this happens when mixing two
> different package manager (archlinux and gentoo); stupid. I
> will clean up my system and try it again.
Maybe one of the next versions of AUCTeX will support it
out-of-the-box, see
<URL:http://thread.gmane.org/slrndeuk91.18j.fab@node1.ddorf.de>.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: modify syntax highlighting in auctex
2005-08-03 18:56 ` Reiner Steib
@ 2005-08-04 13:35 ` Fabian Braennstroem
0 siblings, 0 replies; 9+ messages in thread
From: Fabian Braennstroem @ 2005-08-04 13:35 UTC (permalink / raw)
Hi,
On 2005-08-03, Reiner Steib <reinersteib+from-uce@imap.cc> wrote:
> On Wed, Aug 03 2005, Fabian Braennstroem wrote:
>
> > On 2005-08-02, Reiner Steib <reinersteib+from-uce@imap.cc> wrote:
> [...]
> >> 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.
> >
> > Thanks! Somehow, both example don't work.
>
> For AUCTeX <= 11.55 (including 11.55!) it should work with...
>
> (setq font-latex-match-title-3-keywords (list "frametitle"))
>
> [...]
> > Aeh, just found that I use auctex 11.52 ... I actually
> > already installed 11.55, but this happens when mixing two
> > different package manager (archlinux and gentoo); stupid. I
> > will clean up my system and try it again.
>
> Maybe one of the next versions of AUCTeX will support it
> out-of-the-box, see
> <URL:http://thread.gmane.org/slrndeuk91.18j.fab@node1.ddorf.de>.
Thanks! Works nice.
Greetings, Fabian
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-08-04 13:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-02 10:47 modify syntax highlighting in auctex Fabian Braennstroem
2005-08-02 11:34 ` Ralf Angeli
2005-08-02 12:32 ` Reiner Steib
2005-08-02 12:59 ` Ralf Angeli
2005-08-02 16:00 ` Reiner Steib
2005-08-03 9:35 ` Fontification of titles in LaTeX slides (was: modify syntax highlighting in auctex) Ralf Angeli
2005-08-03 9:38 ` modify syntax highlighting in auctex Fabian Braennstroem
2005-08-03 18:56 ` Reiner Steib
2005-08-04 13:35 ` Fabian Braennstroem
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).