Mercurial > hg > xemacs-beta
comparison etc/auctex/style/slides.el @ 118:7d55a9ba150c r20-1b11
Import from CVS: tag r20-1b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:24:17 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
117:578fd4947a72 | 118:7d55a9ba150c |
---|---|
1 ;;; slides.el - Special code for slitex. | |
2 ;; | |
3 ;; $Id: slides.el,v 1.1 1997/04/05 17:56:47 steve Exp $ | |
4 | |
5 (require 'latex) | |
6 | |
7 ;;; Code: | |
8 | |
9 (TeX-add-style-hook "slides" | |
10 (function | |
11 (lambda () | |
12 (setq LaTeX-default-style "slides") | |
13 (add-hook 'LaTeX-document-style-hook 'LaTeX-style-slides) | |
14 (LaTeX-add-environments '("slide" LaTeX-env-slide) | |
15 '("overlay" LaTeX-env-slide)) | |
16 (TeX-run-style-hooks "SLITEX")))) | |
17 | |
18 (defvar LaTeX-slide-color "" | |
19 "*Default slide color.") | |
20 | |
21 (make-variable-buffer-local 'LaTeX-slide-color) | |
22 | |
23 (defun LaTeX-style-slides () | |
24 "Prompt for and insert SliTeX options." | |
25 (let ((slide-file (read-input "Slide file: ")) | |
26 (slide-colors (read-input "Slide colors (comma separetade list): " | |
27 "black"))) | |
28 (save-excursion | |
29 (goto-char (point-min)) ; insert before \end{document} | |
30 (if (re-search-forward ".end.document." (point-max) t) | |
31 (beginning-of-line 1)) | |
32 (open-line 2) | |
33 (indent-relative-maybe) | |
34 (if (equal slide-colors "black") | |
35 (insert TeX-esc "blackandwhite" | |
36 TeX-grop slide-file TeX-grcl) | |
37 (progn | |
38 (insert TeX-esc "colors" | |
39 TeX-grop slide-colors TeX-grcl) | |
40 (newline-and-indent) | |
41 (insert TeX-esc "colorslides" | |
42 TeX-grop slide-file TeX-grcl)))))) | |
43 | |
44 (defun LaTeX-env-slide (environment) | |
45 "Insert ENVIRONMENT and prompt for slide colors." | |
46 (setq LaTeX-slide-color | |
47 (read-input "Slide colors: " LaTeX-slide-color)) | |
48 (LaTeX-insert-environment environment | |
49 (concat TeX-grop LaTeX-slide-color TeX-grcl))) | |
50 | |
51 | |
52 ;;; slides.el ends here |