]> git.donarmstrong.com Git - lib.git/blob - emacs_el/curve.el
fix missing ) for org-mode
[lib.git] / emacs_el / curve.el
1 ;;; curve.el --- AUC-TeX style file for CurVe
2
3 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Didier Verna.
4
5 ;; Author:        Didier Verna <didier@lrde.epita.fr>
6 ;; Maintainer:    Didier Verna <didier@lrde.epita.fr>
7 ;; Created:       Tue Apr 18 14:49:29 2000
8 ;; Last Revision: Wed May 19 16:33:24 2004
9 ;; Keywords:      tex abbrev data
10
11 ;; This file is part of CurVe.
12
13 ;; CurVe may be distributed and/or modified under the
14 ;; conditions of the LaTeX Project Public License, either version 1.1
15 ;; of this license or (at your option) any later version.
16 ;; The latest version of this license is in
17 ;; http://www.latex-project.org/lppl.txt
18 ;; and version 1.1 or later is part of all distributions of LaTeX
19 ;; version 1999/06/01 or later.
20
21 ;; CurVe consists of all files listed in the file `README'.
22
23
24 ;;; Commentary:
25
26 ;; Contents management by FCM version 0.1-b2.
27
28
29 ;;; Code:
30
31 (defun curve-rubric-file (optional &optional prompt)
32   "Prompt for a CurVe rubric filename in the current directory.
33
34 Caution: because of the flavor mechanism of CurVe, this function will use
35 the choosen  file name sans the last TWO extensions."
36   (TeX-argument-insert
37    (file-name-sans-extension
38     (file-name-sans-extension
39      (read-file-name (TeX-argument-prompt optional
40                                           prompt "Rubric file")
41                      "" "" nil)))
42    optional))
43
44 (defun curve-rubric-item ()
45   ;; Ideally, we should have a way (like, a prefix) to specify either an
46   ;; entry, an entry* or a subrubric. But that would require to hack AUC-TeX
47   ;; in order to pass an optional argument to LaTeX-insert-item.
48   (TeX-insert-macro "entry*"))
49
50 (add-hook 'LaTeX-mode-hook
51           (lambda ()
52             (setq LaTeX-item-list
53                   (cons '("rubric" . curve-rubric-item) LaTeX-item-list))))
54
55
56 (TeX-add-style-hook "curve"
57   (function
58    (lambda ()
59      (TeX-add-symbols
60       '("photo" [ "Placement (l, c or r)" ] t)
61       '("photosep")
62       '("photoscale" t)
63       '("leftheader" t)
64       '("rightheader" t)
65       '("headerscale" t)
66       '("headerspace")
67       '("makeheaders" [ "Alignment (t, c or b)" ])
68
69       '("title" "Title")
70       '("subtitle" "Subtitle")
71       '("titlespace")
72       '("titlefont" "Font for title")
73       '("subtitlefont" "Font for subtitle")
74       '("maketitle")
75
76       '("flavor" "Flavor")
77       '("makerubric" curve-rubric-file)
78
79       '("rubricalignment" "Alignment (l, c, r, cl, cc)")
80       '("rubricfont" "For for rubrics")
81       '("rubricspace")
82
83       '("subrubric" "Subrubric name")
84       '("subrubricalignment" "Alignment (l, c, r, cl, cc)")
85       '("subrubricfont" "Font for subrubrics")
86       '("subrubricspace")
87       '("subrubricbeforespace")
88
89       '("entry"  [ "Key" ] t)
90       '("entry*" [ "Key" ])
91       '("keyfont" "Font for keys")
92       '("keyalignment" "Alignment (l, c, or r)")
93       '("prefix" "Prefix command")
94
95       '("continuedname" "Continuation name")
96       '("listpubname" "List of publications name")
97       )
98      (LaTeX-add-environments
99       '("rubric" "Name")
100       )
101      )))
102
103
104 \f
105
106 ;;; Local variables:
107 ;;; eval: (put 'TeX-add-style-hook 'lisp-indent-function 1)
108 ;;; End:
109
110 ;;; curve.el ends here