;;; beamer.el --- AUCTeX style for the latex-beamer class;; Copyright (C) 2004 Thomas Baumann;; License: GPL, see the file COPYING in the base directory of AUCTeX;; Author: Thomas Baumann <thomas.baumann@ch.tum.de>;; Created: 2003-12-20;; Version: $Id$;; Keywords: tex;;; Commentary:;; This file adds support for the latex-beamer class.;;;; This file is intended to be used with the AUCTeX-Package.;; Put this File into your TeX-style-path. You may also;; byte-compile this file.;;; Code:(TeX-add-style-hook"beamer"(function(lambda()(defvarbeamer-use-section-labels-flagnil"Controls whether section labels are added")(unlessbeamer-use-section-labels-flag(make-local-variable'LaTeX-section-hook)(setqLaTeX-section-hook'(LaTeX-section-headingLaTeX-section-titleLaTeX-section-section)))(setqLaTeX-item-list(append'(("itemize".LaTeX-item-beamer)("enumerate".LaTeX-item-beamer))LaTeX-item-list))(TeX-add-symbols'("alert"1)'("alt"TeX-arg-beamer-overlay-spec2)'("beamerbutton"1)'("beamergotobutton"1)'("beamerreturnbutton"1)'("beamerskipbutton"1)'("frame"TeX-arg-beamer-frametitle)'("frametitle"1)'("hyperlink"TeX-arg-beamer-overlay-spec2)'("hyperlinkslideprev"TeX-arg-beamer-overlay-spec1)'("hyperlinkslidenext"TeX-arg-beamer-overlay-spec1)'("hyperlinkframestart"TeX-arg-beamer-overlay-spec1)'("hyperlinkframeend"TeX-arg-beamer-overlay-spec1)'("hyperlinkframestartnext"TeX-arg-beamer-overlay-spec1)'("hyperlinkframeendprev"TeX-arg-beamer-overlay-spec1)'("hyperlinkpresentationstart"TeX-arg-beamer-overlay-spec1)'("hyperlinkpresentationend"TeX-arg-beamer-overlay-spec1)'("hyperlinkappendixstart"TeX-arg-beamer-overlay-spec1)'("hyperlinkappendixend"TeX-arg-beamer-overlay-spec1)'("hyperlinkdocumentstart"TeX-arg-beamer-overlay-spec1)'("hyperlinkdocumentend"TeX-arg-beamer-overlay-spec1)'("hypertarget"TeX-arg-beamer-overlay-spec2)'("institute"1)'("invisible"TeX-arg-beamer-overlay-spec1)'("label"TeX-arg-beamer-overlay-spec1)'("logo"1)'("note"TeX-arg-beamer-note1)'("only"TeX-arg-beamer-overlay-spec1)'("onslide"TeX-arg-beamer-overlay-spec)'("partpage")'("pause")'("structure"TeX-arg-beamer-overlay-spec1)'("temporal"TeX-arg-beamer-overlay-spec3)'("titlepage")'("titlegraphic"1)'("uncover"TeX-arg-beamer-overlay-spec1)'("visible"TeX-arg-beamer-overlay-spec1))(LaTeX-add-environments'("actionenv")'("alertblock"1)'("beamerboxesrounded"1)'("block"1)'("column""Width")"columns""columnsonlytextwidth"'("exampleblock"1)'("onlyenv"(lambda(env&restignore)(LaTeX-insert-environmentenv(let((overlay(read-input"Overlay: ")))(if(not(zerop(lengthoverlay)))(format"<%s>"overlay))))))'("overlayarea""Area width""Area height")'("overprint"(lambda(env&restignore)(LaTeX-insert-environmentenv(let((overlay(read-input"Overlay: ")))(if(not(zerop(lengthoverlay)))(format"{%s}"overlay))))))))))(defunTeX-arg-beamer-overlay-spec(optional&optionalprompt)"Prompt for overlay specification."(let((overlay(read-input"Overlay: ")))(if(not(zerop(lengthoverlay)))(progn(insert"<"overlay">")))(indent-according-to-mode)))(defunTeX-arg-beamer-frametitle(optional&optionalprompt)"Prompt for the frametitle."(let((title(read-input"What title: ")))(if(not(zerop(lengthtitle)))(progn(insertTeX-gropTeX-esc"frametitle"TeX-groptitleTeX-grclTeX-grcl))(progn(insertTeX-gropTeX-grcl)))))(defunLaTeX-item-beamer()"Insert a new item with an optional overlay argument."(TeX-insert-macro"item")(delete-horizontal-space)(TeX-arg-beamer-overlay-spec0)(insert" ")(indent-according-to-mode))(defunTeX-arg-beamer-note(optional&optionalprompt)"Prompt for overlay specification and optional argument."(let((overlay(read-input"Overlay: "))(options(read-input"Options: ")))(if(not(zerop(lengthoverlay)))(progn(insert"<"overlay">")))(if(not(zerop(lengthoptions)))(progn(insert"["options"]")))(indent-according-to-mode)))