Re: beamer: completion for \usetheme and \usecolortheme
Masayuki Ataka <[email protected]>
| Newsgroups | gmane.emacs.auc-tex |
|---|---|
| Message-ID | <[email protected]> |
From: Reiner Steib <[email protected]> Subject: beamer: completion for \usetheme and \usecolortheme Date: Tue, 01 Mar 2005 22:32:26 +0100 Hi, I love beamer, too. > > unless there is objection, I intent to commit completion for \usetheme > and \usecolortheme to `style/beamer.el' (TeX-arg-beamer-*theme) and > `latex.el' (the variables `LaTeX-beamer-*themes') tomorrow. Below > you'll find a draft version (I will convert the defvars into > defcustoms later). > > I guess there is no way to create the list of themes via > `TeX-search-files' (the LaTeX files are called beamertheme*.sty and > beamercolortheme*.sty). Or am I missing something? > This is a quick hack, but we can get the list of beamer's theme name. (delete nil (mapcar (lambda (file) (and (numberp (string-match "^beamertheme" file)) (substring file (string-width "beamertheme")))) (TeX-search-files nil '("tex" "sty") t t))) We can get beamercolotheme*, beamerfonttheme*, beameroutertheme*, and so forth. (Maybe, we should remove themes which start small letter from list of themes, because they are still available only for backward compatibility.) If "beamer.cls" is in `/ush/share/texmf/tex/latex/beamer/base/', then beamer theme files would be in "../themes/theme" (relative path from `beamer.cls'). So, if we know where "beamer.cls" is, we can specify second optional argument of `TeX-search-files'. For example, (let ((dir (Foo-search-class-file "beamer.cls"))) (setq dir (expand-file-name "../" (file-name-directory dir))) (TeX-search-files dir '("tex" "sty") t t)) Oh, I don't know Foo-search-class-file is exist Xp best, --- email: [email protected] Name:: Masayuki Ataka // (Japan)