Debian Codegraph @

texmf-dist/doc/latex/curve/curve.el

raw
1 ;;; curve.el --- AUC-TeX style file for CurVe
2
3 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Didier Verna.
4
5 ;; Author: Didier Verna <[email protected]>
6 ;; Maintainer: Didier Verna <[email protected]>
7 ;; Created: Tue Apr 18 14:49:29 2000
8 ;; Last Revision: Wed Jul 18 17:28:55 2007
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 ;; no need to support \today since it is a standard command
70 '("title" "Title")
71 '("subtitle" "Subtitle")
72 '("titlespace")
73 '("titlefont" "Font for title")
74 '("titlealignment" "Alignment (l, c, r)")
75 '("subtitlefont" "Font for subtitle")
76 '("maketitle")
77
78 '("flavor" "Flavor")
79 '("makerubric" curve-rubric-file)
80
81 '("rubricalignment" "Alignment (l, c, r, cl, cc)")
82 '("rubricfont" "For for rubrics")
83 '("rubricspace")
84 '("rubricafterspace")
85
86 '("subrubric" "Subrubric name")
87 '("subrubricalignment" "Alignment (l, c, r, cl, cc)")
88 '("subrubricfont" "Font for subrubrics")
89 '("subrubricspace")
90 '("subrubricbeforespace")
91
92 '("entry" [ "Key" ] t)
93 '("entry*" [ "Key" ])
94 '("noentry" "Invisible (long) key")
95 '("keyfont" "Font for keys")
96 '("keyalignment" "Alignment (l, c, or r)")
97 '("prefix" "Prefix command")
98
99 '("continuedname" "Continuation name")
100 '("listpubname" "List of publications name"))
101 (LaTeX-add-environments
102 '("rubric" "Name")))))
103
104
105
106
107 ;;; Local variables:
108 ;;; eval: (put 'TeX-add-style-hook 'lisp-indent-function 1)
109 ;;; End:
110
111 ;;; curve.el ends here