annotate yatexadd.el @ 69:807c1e7e68b7

yahtml-escape-chars-region Translate <>"& to entity reference. And inverse translation to above. yahtml-translate-hyphens-when-comment-region yahtml-prefer-upcase-attributes Inquire .htaccess file to determine the file-coding-system. Completions for StyleSheet. ---yahtml--- Auto insert of \), \|, \] after corresponding \(, \| \]. [prefix] c for \right\left parens.
author yuuji
date Thu, 15 Jul 1999 04:58:26 +0000
parents 0eb6997bee16
children 44e3a5e1e883
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
1 ;;; -*- Emacs-Lisp -*-
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
2 ;;; YaTeX add-in functions.
68
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
3 ;;; yatexadd.el rev.14
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
4 ;;; (c )1991-1999 by HIROSE Yuuji.[yuuji@gentei.org]
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
5 ;;; Last modified Tue Jul 13 13:57:45 1999 on firestorm
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
6 ;;; $Id$
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
7
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
8 ;;;
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
9 ;;Sample functions for LaTeX environment.
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
10 ;;;
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
11 (defvar YaTeX:tabular-default-rule
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
12 "@{\\vrule width 1pt\\ }c|c|c@{\\ \\vrule width 1pt}"
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
13 "*Your favorite default rule format.")
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
14
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
15 (defvar YaTeX:tabular-thick-vrule "\\vrule width %s"
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
16 "*Vertical thick line format (without @{}). %s'll be replaced by its width.")
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
17
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
18 (defvar YaTeX:tabular-thick-hrule "\\noalign{\\hrule height %s}"
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
19 "*Horizontal thick line format. %s will be replaced by its width.")
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
20
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
21 (defun YaTeX:tabular ()
18
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
22 "YaTeX add-in function for tabular environment.
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
23 Notice that this function refers the let-variable `env' in
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
24 YaTeX-make-begin-end."
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
25 (let ((width "") bars (rule "") (and "") (j 1) loc ans (hline "\\hline"))
18
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
26 (if (string= env "tabular*")
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
27 (setq width (concat "{" (read-string "Width: ") "}")))
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
28 (setq loc (YaTeX:read-position "tb")
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
29 bars (string-to-int
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
30 (read-string "Number of columns(0 for default format): " "3")))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
31 (if (<= bars 0)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
32 (setq ;if 0, simple format
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
33 rule YaTeX:tabular-default-rule
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
34 and "& &")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
35 (while (< j bars) ;repeat bars-1 times
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
36 (setq rule (concat rule "c|")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
37 and (concat and "& ")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
38 j (1+ j)))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
39 (setq rule (concat rule "c"))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
40 (message "(N)ormal-frame or (T)hick frame? [nt]")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
41 (setq ans (read-char))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
42 (cond
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
43 ((or (equal ans ?t) (equal ans ?T))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
44 (setq ans (read-string "Rule width: " "1pt")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
45 rule (concat
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
46 "@{" (format YaTeX:tabular-thick-vrule ans) "}"
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
47 rule
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
48 "@{\\ " (format YaTeX:tabular-thick-vrule ans) "}")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
49 hline (format YaTeX:tabular-thick-hrule ans)))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
50 (t (setq rule (concat "|" rule "|")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
51 hline "\\hline"))))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
52
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
53 (setq rule (read-string "rule format: " rule))
58
3a7c0c2bf16d Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents: 57
diff changeset
54 (setq single-command "hline")
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
55
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
56 (format "%s%s{%s}" width loc rule)))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
57
18
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
58 (fset 'YaTeX:tabular* 'YaTeX:tabular)
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
59 (defun YaTeX:array ()
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
60 (concat (YaTeX:read-position "tb")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
61 "{" (read-string "Column format: ") "}"))
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
62
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
63 (defun YaTeX:read-oneof (oneof)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
64 (let ((pos "") loc (guide ""))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
65 (and (boundp 'name) name (setq guide (format "%s " name)))
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
66 (while (not (string-match
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
67 (setq loc (read-key-sequence
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
68 (format "%s position (`%s') [%s]: "
68
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
69 guide oneof pos));name is in YaTeX-addin
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
70 loc (if (fboundp 'events-to-keys)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
71 (events-to-keys loc) loc))
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
72 "\r\^g\n"))
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
73 (cond
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
74 ((string-match loc oneof)
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
75 (if (not (string-match loc pos))
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
76 (setq pos (concat pos loc))))
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
77 ((and (string-match loc "\C-h\C-?") (> (length pos) 0))
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
78 (setq pos (substring pos 0 (1- (length pos)))))
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
79 (t
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
80 (ding)
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
81 (message "Please input one of `%s'." oneof)
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
82 (sit-for 3))))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
83 (message "")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
84 pos))
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
85
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
86 (defun YaTeX:read-position (oneof)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
87 "Read a LaTeX (optional) position format such as `[htbp]'."
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
88 (let ((pos (YaTeX:read-oneof oneof)))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
89 (if (string= pos "") "" (concat "[" pos "]"))))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
90
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
91 (defun YaTeX:table ()
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
92 "YaTeX add-in function for table environment."
68
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
93 (setq env-name "tabular"
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
94 section-name "caption")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
95 (YaTeX:read-position "htbp"))
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
96
46
cd1b63102eed Support Mule2
yuuji
parents: 43
diff changeset
97 (fset 'YaTeX:figure 'YaTeX:table)
cd1b63102eed Support Mule2
yuuji
parents: 43
diff changeset
98 (fset 'YaTeX:figure* 'YaTeX:table)
cd1b63102eed Support Mule2
yuuji
parents: 43
diff changeset
99
cd1b63102eed Support Mule2
yuuji
parents: 43
diff changeset
100
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
101 (defun YaTeX:description ()
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
102 "Truly poor service:-)"
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
103 (setq single-command "item[]")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
104 "")
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
105
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
106 (defun YaTeX:itemize ()
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
107 "It's also poor service."
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
108 (setq single-command "item")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
109 "")
6
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
110
49be9ccb0b65 Temporary dictionary.
yuuji
parents:
diff changeset
111 (fset 'YaTeX:enumerate 'YaTeX:itemize)
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
112
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
113 (defun YaTeX:picture ()
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
114 "Ask the size of coordinates of picture environment."
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
115 (concat (YaTeX:read-coordinates "Picture size")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
116 (YaTeX:read-coordinates "Initial position")))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
117
12
a7f397790cdc Revise YaTeX-typeset faster.
yuuji
parents: 11
diff changeset
118 (defun YaTeX:equation ()
59
48ac97a6b6ce Call drawing tools
yuuji
parents: 58
diff changeset
119 (YaTeX-jmode-off)
12
a7f397790cdc Revise YaTeX-typeset faster.
yuuji
parents: 11
diff changeset
120 (if (fboundp 'YaTeX-toggle-math-mode)
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
121 (YaTeX-toggle-math-mode t))) ;force math-mode ON.
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
122
59
48ac97a6b6ce Call drawing tools
yuuji
parents: 58
diff changeset
123 (mapcar '(lambda (f) (fset f 'YaTeX:equation))
48ac97a6b6ce Call drawing tools
yuuji
parents: 58
diff changeset
124 '(YaTeX:eqnarray YaTeX:eqnarray* YaTeX:align YaTeX:align*
48ac97a6b6ce Call drawing tools
yuuji
parents: 58
diff changeset
125 YaTeX:split YaTeX:multline YaTeX:multline* YaTeX:gather YaTeX:gather*
48ac97a6b6ce Call drawing tools
yuuji
parents: 58
diff changeset
126 YaTeX:aligned* YaTeX:gathered YaTeX:gathered*
48ac97a6b6ce Call drawing tools
yuuji
parents: 58
diff changeset
127 YaTeX:alignat YaTeX:alignat* YaTeX:xalignat YaTeX:xalignat*
48ac97a6b6ce Call drawing tools
yuuji
parents: 58
diff changeset
128 YaTeX:xxalignat YaTeX:xxalignat*))
12
a7f397790cdc Revise YaTeX-typeset faster.
yuuji
parents: 11
diff changeset
129
16
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
130 (defun YaTeX:list ()
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
131 "%\n{} %default label\n{} %formatting parameter")
16
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
132
18
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
133 (defun YaTeX:minipage ()
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
134 (concat (YaTeX:read-position "cbt")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
135 "{" (read-string "Width: ") "}"))
18
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
136
64
36a48185b95a Changes are listed in yatex.new.
yuuji
parents: 60
diff changeset
137 (defun YaTeX:thebibliography ()
36a48185b95a Changes are listed in yatex.new.
yuuji
parents: 60
diff changeset
138 (setq section-name "bibitem")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
139 "")
64
36a48185b95a Changes are listed in yatex.new.
yuuji
parents: 60
diff changeset
140
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
141 ;;;
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
142 ;;Sample functions for section-type command.
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
143 ;;;
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
144 (defun YaTeX:multiput ()
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
145 (concat (YaTeX:read-coordinates "Pos")
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
146 (YaTeX:read-coordinates "Step")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
147 "{" (read-string "How many times: ") "}"))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
148
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
149 (defun YaTeX:put ()
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
150 (YaTeX:read-coordinates "Pos"))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
151
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
152 (defun YaTeX:makebox ()
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
153 (cond
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
154 ((YaTeX-in-environment-p "picture")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
155 (concat (YaTeX:read-coordinates "Dimension")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
156 (YaTeX:read-position "lrtb")))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
157 (t
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
158 (let ((width (read-string "Width: ")))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
159 (if (string< "" width)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
160 (progn
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
161 (or (equal (aref width 0) ?\[)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
162 (setq width (concat "[" width "]")))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
163 (concat width (YaTeX:read-position "lr"))))))))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
164
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
165 (defun YaTeX:framebox ()
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
166 (if (YaTeX-quick-in-environment-p "picture")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
167 (YaTeX:makebox)))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
168
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
169 (defun YaTeX:dashbox ()
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
170 (concat "{" (read-string "Dash dimension: ") "}"
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
171 (YaTeX:read-coordinates "Dimension")))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
172
51
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
173 (defvar YaTeX-minibuffer-quick-map nil)
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
174 (if YaTeX-minibuffer-quick-map nil
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
175 (setq YaTeX-minibuffer-quick-map
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
176 (copy-keymap minibuffer-local-completion-map))
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
177 (let ((ch (1+ ? )))
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
178 (while (< ch 127)
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
179 (define-key YaTeX-minibuffer-quick-map (char-to-string ch)
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
180 'YaTeX-minibuffer-quick-complete)
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
181 (setq ch (1+ ch)))))
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
182
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
183 (defvar YaTeX:left-right-delimiters
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
184 '(("(" . ")") (")" . "(") ("[" . "]") ("]" . "[")
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
185 ("\\{" . "\\}") ("\\}" . "\\{") ("|") ("\\|")
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
186 ("\\lfloor" . "\\rfloor") ("\\lceil" . "\\rceil")
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
187 ("\\langle" . "\\rangle") ("/") (".")
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
188 ("\\rfloor" . "\\rfloor") ("\\rceil" . "\\lceil")
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
189 ("\\rangle" . "\\langle") ("\\backslash")
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
190 ("\\uparrow") ("\\downarrow") ("\\updownarrow") ("\\Updownarrow"))
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
191 "TeX math delimiter, which can be completed after \\right or \\left.")
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
192
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
193 (defvar YaTeX:left-right-default nil "Default string of YaTeX:right.")
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
194
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
195 (defun YaTeX:left ()
51
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
196 (let ((minibuffer-completion-table YaTeX:left-right-delimiters)
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
197 delimiter (leftp (string= single-command "left")))
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
198 (setq delimiter
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
199 (read-from-minibuffer
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
200 (format "Delimiter%s: "
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
201 (if YaTeX:left-right-default
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
202 (format "(default=`%s')" YaTeX:left-right-default)
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
203 "(SPC for menu)"))
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
204 nil YaTeX-minibuffer-quick-map))
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
205 (if (string= "" delimiter) (setq delimiter YaTeX:left-right-default))
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
206 (setq single-command (if leftp "right" "left")
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
207 YaTeX:left-right-default
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
208 (or (cdr (assoc delimiter YaTeX:left-right-delimiters)) delimiter))
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
209 delimiter))
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
210
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
211 (fset 'YaTeX:right 'YaTeX:left)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
212
51
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
213
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
214 (defun YaTeX:read-coordinates (&optional mes varX varY)
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
215 (concat
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
216 "("
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
217 (read-string (format "%s %s: " (or mes "Dimension") (or varX "X")))
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
218 ","
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
219 (read-string (format "%s %s: " (or mes "Dimension") (or varY "Y")))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
220 ")"))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
221
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
222 ;;;
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
223 ;;Sample functions for maketitle-type command.
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
224 ;;;
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
225 (defun YaTeX:sum ()
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
226 "Read range of summation."
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
227 (YaTeX:check-completion-type 'maketitle)
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
228 (concat (YaTeX:read-boundary "_") (YaTeX:read-boundary "^")))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
229
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
230 (fset 'YaTeX:int 'YaTeX:sum)
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
231
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
232 (defun YaTeX:lim ()
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
233 "Insert limit notation of \\lim."
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
234 (YaTeX:check-completion-type 'maketitle)
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
235 (let ((var (read-string "Variable: ")) limit)
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
236 (if (string= "" var) ""
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
237 (setq limit (read-string "Limit ($ means infinity): "))
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
238 (if (string= "$" limit) (setq limit "\\infty"))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
239 (concat "_{" var " \\rightarrow " limit "}"))))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
240
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
241 (defun YaTeX:gcd ()
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
242 "Add-in function for \\gcd(m,n)."
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
243 (YaTeX:check-completion-type 'maketitle)
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
244 (YaTeX:read-coordinates "\\gcd" "(?,)" "(,?)"))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
245
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
246 (defun YaTeX:read-boundary (ULchar)
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
247 "Read boundary usage by _ or ^. _ or ^ is indicated by argument ULchar."
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
248 (let ((bndry (read-string (concat ULchar "{???} ($ for infinity): "))))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
249 (if (string= bndry "") ""
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
250 (if (string= bndry "$") (setq bndry "\\infty"))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
251 (concat ULchar "{" bndry "}"))))
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
252
14
b7b023a74293 Region-based section-type completion.
yuuji
parents: 13
diff changeset
253 (defun YaTeX:verb ()
b7b023a74293 Region-based section-type completion.
yuuji
parents: 13
diff changeset
254 "Enclose \\verb's contents with the same characters."
b7b023a74293 Region-based section-type completion.
yuuji
parents: 13
diff changeset
255 (let ((quote-char (read-string "Quoting char: " "|"))
b7b023a74293 Region-based section-type completion.
yuuji
parents: 13
diff changeset
256 (contents (read-string "Quoted contents: ")))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
257 (concat quote-char contents quote-char)))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
258
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
259 (fset 'YaTeX:verb* 'YaTeX:verb)
14
b7b023a74293 Region-based section-type completion.
yuuji
parents: 13
diff changeset
260
43
ef686a35472d Change the default section-type command to footnotetext after
yuuji
parents: 23
diff changeset
261 (defun YaTeX:footnotemark ()
ef686a35472d Change the default section-type command to footnotetext after
yuuji
parents: 23
diff changeset
262 (setq section-name "footnotetext")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
263 nil)
43
ef686a35472d Change the default section-type command to footnotetext after
yuuji
parents: 23
diff changeset
264
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
265 (defun YaTeX:cite ()
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
266 (let ((comment (read-string "Comment for citation: ")))
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
267 (if (string= comment "") ""
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
268 (concat "[" comment "]"))))
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
269
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
270 (defun YaTeX:bibitem ()
64
36a48185b95a Changes are listed in yatex.new.
yuuji
parents: 60
diff changeset
271 (let ((label (read-string "Citation label for bibitem: ")))
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
272 (if (string= label "") ""
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
273 (concat "[" label "]"))))
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
274
53
5f4b18da14b3 Fix functions relating YaTeX-beginning-of-environment or
yuuji
parents: 52
diff changeset
275 (defun YaTeX:item ()
5f4b18da14b3 Fix functions relating YaTeX-beginning-of-environment or
yuuji
parents: 52
diff changeset
276 (YaTeX-indent-line)
5f4b18da14b3 Fix functions relating YaTeX-beginning-of-environment or
yuuji
parents: 52
diff changeset
277 (setq section-name "label")
5f4b18da14b3 Fix functions relating YaTeX-beginning-of-environment or
yuuji
parents: 52
diff changeset
278 " ")
52
5d94deabb9f9 Set YaTeX-indent-line to 'indent-line-function.
yuuji
parents: 51
diff changeset
279 (fset 'YaTeX:item\[\] 'YaTeX:item)
5d94deabb9f9 Set YaTeX-indent-line to 'indent-line-function.
yuuji
parents: 51
diff changeset
280 (fset 'YaTeX:subitem 'YaTeX:item)
5d94deabb9f9 Set YaTeX-indent-line to 'indent-line-function.
yuuji
parents: 51
diff changeset
281 (fset 'YaTeX:subsubitem 'YaTeX:item)
5d94deabb9f9 Set YaTeX-indent-line to 'indent-line-function.
yuuji
parents: 51
diff changeset
282
58
3a7c0c2bf16d Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents: 57
diff changeset
283 (defun YaTeX:linebreak ()
3a7c0c2bf16d Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents: 57
diff changeset
284 (let (obl)
3a7c0c2bf16d Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents: 57
diff changeset
285 (message "Break strength 0,1,2,3,4 (default: 4): ")
3a7c0c2bf16d Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents: 57
diff changeset
286 (setq obl (char-to-string (read-char)))
3a7c0c2bf16d Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents: 57
diff changeset
287 (if (string-match "[0-4]" obl)
3a7c0c2bf16d Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents: 57
diff changeset
288 (concat "[" obl "]")
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
289 "")))
58
3a7c0c2bf16d Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents: 57
diff changeset
290 (fset 'YaTeX:pagebreak 'YaTeX:linebreak)
3a7c0c2bf16d Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents: 57
diff changeset
291
14
b7b023a74293 Region-based section-type completion.
yuuji
parents: 13
diff changeset
292 ;;;
b7b023a74293 Region-based section-type completion.
yuuji
parents: 13
diff changeset
293 ;;Subroutine
b7b023a74293 Region-based section-type completion.
yuuji
parents: 13
diff changeset
294 ;;;
b7b023a74293 Region-based section-type completion.
yuuji
parents: 13
diff changeset
295
8
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
296 (defun YaTeX:check-completion-type (type)
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
297 "Check valid completion type."
c746646cecf5 Restrict YaTeX:framebox in picture environment.
yuuji
parents: 6
diff changeset
298 (if (not (eq type YaTeX-current-completion-type))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
299 (error "This should be completed with %s-type completion." type)))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
300
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
301
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
302 ;;;
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
303 ;;; [[Add-in functions for reading section arguments]]
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
304 ;;;
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
305 ;; All of add-in functions for reading sections arguments should
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
306 ;; take an argument ARGP that specify the argument position.
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
307 ;; If argument position is out of range, nil should be returned,
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
308 ;; else nil should NOT be returned.
13
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
309
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
310 ;;
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
311 ; Label selection
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
312 ;;
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
313 (defvar YaTeX-label-menu-other
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
314 (if YaTeX-japan "':‘¼‚̃oƒbƒtƒ@‚̃‰ƒxƒ‹\n" "':LABEL IN OTHER BUFFER.\n"))
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
315 (defvar YaTeX-label-menu-repeat
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
316 (if YaTeX-japan ".:’¼‘O‚Ì\\ref‚Æ“¯‚¶\n" "/:REPEAT LAST \ref{}\n"))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
317 (defvar YaTeX-label-menu-any
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
318 (if YaTeX-japan "*:”CˆÓ‚Ì•¶Žš—ñ\n" "*:ANY STRING.\n"))
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
319 (defvar YaTeX-label-buffer "*Label completions*")
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
320 (defvar YaTeX-label-guide-msg "Select label and hit RETURN.")
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
321 (defvar YaTeX-label-select-map nil
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
322 "Key map used in label selection buffer.")
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
323 (defun YaTeX::label-setup-key-map ()
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
324 (if YaTeX-label-select-map nil
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
325 (message "Setting up label selection mode map...")
68
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
326 ;(setq YaTeX-label-select-map (copy-keymap global-map))
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
327 (setq YaTeX-label-select-map (make-keymap))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
328 (suppress-keymap YaTeX-label-select-map)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
329 (substitute-all-key-definition
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
330 'previous-line 'YaTeX::label-previous YaTeX-label-select-map)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
331 (substitute-all-key-definition
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
332 'next-line 'YaTeX::label-next YaTeX-label-select-map)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
333 (define-key YaTeX-label-select-map "\C-n" 'YaTeX::label-next)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
334 (define-key YaTeX-label-select-map "\C-p" 'YaTeX::label-previous)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
335 (define-key YaTeX-label-select-map "<" 'beginning-of-buffer)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
336 (define-key YaTeX-label-select-map ">" 'end-of-buffer)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
337 (define-key YaTeX-label-select-map "\C-m" 'exit-recursive-edit)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
338 (define-key YaTeX-label-select-map "\C-j" 'exit-recursive-edit)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
339 (define-key YaTeX-label-select-map " " 'exit-recursive-edit)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
340 (define-key YaTeX-label-select-map "\C-g" 'abort-recursive-edit)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
341 (define-key YaTeX-label-select-map "/" 'isearch-forward)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
342 (define-key YaTeX-label-select-map "?" 'isearch-backward)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
343 (define-key YaTeX-label-select-map "'" 'YaTeX::label-search-tag)
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
344 (define-key YaTeX-label-select-map "." 'YaTeX::label-search-tag)
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
345 (define-key YaTeX-label-select-map "*" 'YaTeX::label-search-tag)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
346 (message "Setting up label selection mode map...Done")
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
347 (let ((key ?A))
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
348 (while (<= key ?Z)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
349 (define-key YaTeX-label-select-map (char-to-string key)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
350 'YaTeX::label-search-tag)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
351 (define-key YaTeX-label-select-map (char-to-string (+ key (- ?a ?A)))
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
352 'YaTeX::label-search-tag)
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
353 (setq key (1+ key))))))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
354
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
355 (defun YaTeX::label-next ()
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
356 (interactive) (forward-line 1) (message YaTeX-label-guide-msg))
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
357 (defun YaTeX::label-previous ()
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
358 (interactive) (forward-line -1) (message YaTeX-label-guide-msg))
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
359 (defun YaTeX::label-search-tag ()
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
360 (interactive)
68
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
361 (let ((case-fold-search t)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
362 (tag (regexp-quote (char-to-string last-command-char))))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
363 (cond
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
364 ((save-excursion
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
365 (forward-char 1)
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
366 (re-search-forward (concat "^" tag) nil t))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
367 (goto-char (match-beginning 0)))
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
368 ((save-excursion
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
369 (goto-char (point-min))
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
370 (re-search-forward (concat "^" tag) nil t))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
371 (goto-char (match-beginning 0))))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
372 (message YaTeX-label-guide-msg)))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
373
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
374 (defun YaTeX::ref (argp &optional labelcmd refcmd)
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
375 (cond
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
376 ((= argp 1)
60
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
377 (let ((lnum 0) e0 label label-list (buf (current-buffer))
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
378 (labelcmd (or labelcmd "label")) (refcmd (or refcmd "ref"))
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
379 (p (point)) initl line cf)
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
380 (message "Collecting labels...")
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
381 (save-window-excursion
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
382 (YaTeX-showup-buffer
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
383 YaTeX-label-buffer (function (lambda (x) (window-width x))))
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
384 (if (fboundp 'select-frame) (setq cf (selected-frame)))
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
385 (if (eq (window-buffer (minibuffer-window)) buf)
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
386 (progn
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
387 (other-window 1)
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
388 (setq buf (current-buffer))
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
389 (set-buffer buf)
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
390 ;(message "cb=%s" buf)(sit-for 3)
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
391 ))
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
392 (save-excursion
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
393 (set-buffer (get-buffer-create YaTeX-label-buffer))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
394 (setq buffer-read-only nil)
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
395 (erase-buffer))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
396 (save-excursion
60
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
397 (goto-char (point-min))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
398 (let ((standard-output (get-buffer YaTeX-label-buffer)))
60
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
399 (princ (format "=== LABELS in [%s] ===\n" (buffer-name buf)))
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
400 (while (YaTeX-re-search-active-forward
57
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
401 (concat "\\\\" labelcmd "\\b")
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
402 (regexp-quote YaTeX-comment-prefix) nil t)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
403 (goto-char (match-beginning 0))
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
404 (skip-chars-forward "^{")
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
405 (setq label
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
406 (buffer-substring
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
407 (1+ (point))
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
408 (prog2 (forward-list 1) (setq e0 (1- (point)))))
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
409 label-list (cons label label-list))
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
410 (or initl
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
411 (if (< p (point)) (setq initl lnum)))
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
412 (beginning-of-line)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
413 (skip-chars-forward " \t\n" nil)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
414 (princ (format "%c:{%s}\t<<%s>>\n" (+ (% lnum 26) ?A) label
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
415 (buffer-substring (point) (point-end-of-line))))
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
416 (setq lnum (1+ lnum))
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
417 (message "Collecting \\%s{}... %d" labelcmd lnum)
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
418 (goto-char e0))
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
419 (princ YaTeX-label-menu-other)
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
420 (princ YaTeX-label-menu-repeat)
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
421 (princ YaTeX-label-menu-any)
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
422 );standard-output
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
423 (goto-char p)
60
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
424 (or initl (setq initl lnum))
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
425 (message "Collecting %s...Done" labelcmd)
60
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
426 (if (fboundp 'select-frame) (select-frame cf))
59
48ac97a6b6ce Call drawing tools
yuuji
parents: 58
diff changeset
427 (YaTeX-showup-buffer YaTeX-label-buffer nil t)
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
428 (YaTeX::label-setup-key-map)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
429 (setq truncate-lines t)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
430 (setq buffer-read-only t)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
431 (use-local-map YaTeX-label-select-map)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
432 (message YaTeX-label-guide-msg)
60
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
433 (goto-line (1+ initl)) ;goto recently defined label line
68
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
434 (switch-to-buffer (current-buffer))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
435 (unwind-protect
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
436 (progn
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
437 (recursive-edit)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
438 (set-buffer (get-buffer YaTeX-label-buffer)) ;assertion
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
439 (beginning-of-line)
60
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
440 (setq line (1- (count-lines (point-min)(point))))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
441 (cond
60
9e08ed569d80 yahtml: change keystroke of calling browser to [prefix] t p
yuuji
parents: 59
diff changeset
442 ((= line -1) (setq label ""))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
443 ((= line lnum) (setq label (YaTeX-label-other)))
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
444 ((= line (1+ lnum))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
445 (save-excursion
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
446 (switch-to-buffer buf)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
447 (goto-char p)
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
448 (if (re-search-backward
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
449 (concat "\\\\" refcmd "{\\([^}]+\\)}") nil t)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
450 (setq label (YaTeX-match-string 1))
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
451 (setq label ""))))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
452 ((>= line (+ lnum 2))
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
453 (setq label (read-string (format "\\%s{???}: " refcmd))))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
454 (t (setq label (nth (- lnum line 1) label-list)))))
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
455 (bury-buffer YaTeX-label-buffer)))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
456 label)))))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
457
16
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
458 (fset 'YaTeX::pageref 'YaTeX::ref)
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
459 (defun YaTeX::cite (argp)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
460 (cond
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
461 ((eq argp 1)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
462 (YaTeX::ref argp "bibitem\\(\\[.*\\]\\)?" "cite"))
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
463 (t nil)))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
464
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
465 (defun YaTeX-yatex-buffer-list ()
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
466 (save-excursion
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
467 (delq nil (mapcar (function (lambda (buf)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
468 (set-buffer buf)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
469 (if (eq major-mode 'yatex-mode) buf)))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
470 (buffer-list)))))
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
471
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
472 (defun YaTeX-select-other-yatex-buffer ()
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
473 "Select buffer from all yatex-mode's buffers interactivelly."
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
474 (interactive)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
475 (let ((lbuf "*YaTeX mode buffers*") (blist (YaTeX-yatex-buffer-list))
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
476 (lnum -1) buf rv
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
477 (ff "**find-file**"))
12
a7f397790cdc Revise YaTeX-typeset faster.
yuuji
parents: 11
diff changeset
478 (YaTeX-showup-buffer
a7f397790cdc Revise YaTeX-typeset faster.
yuuji
parents: 11
diff changeset
479 lbuf (function (lambda (x) 1))) ;;Select next window surely.
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
480 (save-excursion
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
481 (set-buffer (get-buffer lbuf))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
482 (setq buffer-read-only nil)
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
483 (erase-buffer))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
484 (let ((standard-output (get-buffer lbuf)))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
485 (while blist
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
486 (princ
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
487 (format "%c:{%s}\n" (+ (% (setq lnum (1+ lnum)) 26) ?A)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
488 (buffer-name (car blist))))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
489 (setq blist (cdr blist)))
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
490 (princ (format "':{%s}" ff)))
59
48ac97a6b6ce Call drawing tools
yuuji
parents: 58
diff changeset
491 (YaTeX-showup-buffer lbuf nil t)
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
492 (YaTeX::label-setup-key-map)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
493 (setq buffer-read-only t)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
494 (use-local-map YaTeX-label-select-map)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
495 (message YaTeX-label-guide-msg)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
496 (unwind-protect
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
497 (progn
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
498 (recursive-edit)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
499 (set-buffer lbuf)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
500 (beginning-of-line)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
501 (setq rv
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
502 (if (re-search-forward "{\\([^\\}]+\\)}" (point-end-of-line) t)
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
503 (buffer-substring (match-beginning 1) (match-end 1)) nil)))
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
504 (kill-buffer lbuf))
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
505 (if (string= rv ff)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
506 (progn
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
507 (call-interactively 'find-file)
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
508 (current-buffer))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
509 rv)))
48
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
510
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
511 (defun YaTeX-label-other ()
a0640ff3f72f Inter-file ref/label, cite/bibitem jump.
yuuji
parents: 46
diff changeset
512 (let ((rv (YaTeX-select-other-yatex-buffer)))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
513 (cond
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
514 ((null rv) "")
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
515 (t
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
516 (set-buffer rv)
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
517 (YaTeX::ref argp labelcmd refcmd)))))
11
390df0e505da Label completion works.
yuuji
parents: 8
diff changeset
518
13
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
519 ;;
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
520 ; completion for the arguments of \newcommand
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
521 ;;
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
522 (defun YaTeX::newcommand (&optional argp)
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
523 (cond
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
524 ((= argp 1)
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
525 (let ((command (read-string "Define newcommand: " "\\")))
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
526 (put 'YaTeX::newcommand 'command (substring command 1))
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
527 command))
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
528 ((= argp 2)
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
529 (let ((argc
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
530 (string-to-int (read-string "Number of arguments(Default 0): ")))
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
531 (def (read-string "Definition: "))
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
532 (command (get 'YaTeX::newcommand 'command)))
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
533 ;;!!! It's illegal to insert string in the add-in function !!!
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
534 (if (> argc 0) (insert (format "[%d]" argc)))
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
535 (if (and (stringp command)
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
536 (string< "" command)
51
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
537 (y-or-n-p "Update dictionary?"))
18
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
538 (cond
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
539 ((= argc 0)
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
540 (YaTeX-update-table
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
541 (list command)
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
542 'singlecmd-table 'user-singlecmd-table 'tmp-singlecmd-table))
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
543 ((= argc 1)
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
544 (YaTeX-update-table
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
545 (list command)
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
546 'section-table 'user-section-table 'tmp-section-table))
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
547 (t (YaTeX-update-table
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
548 (list command argc)
adc2f1472409 Make variables for temporary dictionary buffer-local.
yuuji
parents: 16
diff changeset
549 'section-table 'user-section-table 'tmp-section-table))))
13
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
550 (message "")
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
551 def ;return command name
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
552 ))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
553 (t "")))
13
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
554
16
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
555 ;;
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
556 ; completion for the arguments of \pagestyle
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
557 ;;
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
558 (defun YaTeX::pagestyle (&optional argp)
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
559 "Read the pagestyle with completion."
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
560 (completing-read
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
561 "Page style: "
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
562 '(("plain") ("empty") ("headings") ("myheadings") ("normal") nil)))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
563
51
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
564 (fset 'YaTeX::thispagestyle 'YaTeX::pagestyle)
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
565
16
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
566 ;;
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
567 ; completion for the arguments of \pagenumbering
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
568 ;;
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
569 (defun YaTeX::pagenumbering (&optional argp)
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
570 "Read the numbering style."
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
571 (completing-read
cb9afa9c1213 Auto-indentation at begin-type completion works correctly.
yuuji
parents: 14
diff changeset
572 "Page numbering style: "
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
573 '(("arabic") ("Alpha") ("alpha") ("Roman") ("roman"))))
13
eafae54794a0 Show message at comment-region on begin/end mode.
yuuji
parents: 12
diff changeset
574
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
575 ;;
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
576 ; Length
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
577 ;;
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
578 (defvar YaTeX:style-parameters-default
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
579 '(("\\arraycolsep")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
580 ("\\arrayrulewidth")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
581 ("\\baselineskip")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
582 ("\\columnsep")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
583 ("\\columnseprule")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
584 ("\\doublerulesep")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
585 ("\\evensidemargin")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
586 ("\\footheight")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
587 ("\\footskip")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
588 ("\\headheight")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
589 ("\\headsep")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
590 ("\\itemindent")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
591 ("\\itemsep")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
592 ("\\labelsep")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
593 ("\\labelwidth")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
594 ("\\leftmargin")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
595 ("\\linewidth")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
596 ("\\listparindent")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
597 ("\\marginparsep")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
598 ("\\marginparwidth")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
599 ("\\mathindent")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
600 ("\\oddsidemargin")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
601 ("\\parindent")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
602 ("\\parsep")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
603 ("\\parskip")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
604 ("\\partopsep")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
605 ("\\rightmargin")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
606 ("\\tabcolsep")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
607 ("\\textheight")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
608 ("\\textwidth")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
609 ("\\topmargin")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
610 ("\\topsep")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
611 ("\\topskip")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
612 )
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
613 "Alist of LaTeX style parameters.")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
614 (defvar YaTeX:style-parameters-private nil
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
615 "*User definable alist of style parameters.")
49
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
616 (defvar YaTeX:style-parameters-local nil
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
617 "*User definable alist of local style parameters.")
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
618
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
619 (defvar YaTeX:length-history nil "Holds history of length.")
51
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
620 (put 'YaTeX:length-history 'no-default t)
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
621 (defun YaTeX::setlength (&optional argp)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
622 "YaTeX add-in function for arguments of \\setlength."
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
623 (cond
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
624 ((equal 1 argp)
49
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
625 ;;(completing-read "Length variable: " YaTeX:style-parameters nil nil "\\")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
626 (YaTeX-cplread-with-learning
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
627 "Length variable: "
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
628 'YaTeX:style-parameters-default
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
629 'YaTeX:style-parameters-private
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
630 'YaTeX:style-parameters-local
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
631 nil nil "\\")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
632 )
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
633 ((equal 2 argp)
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
634 (read-string-with-history "Length: " nil 'YaTeX:length-history))))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
635
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
636 (fset 'YaTeX::addtolength 'YaTeX::setlength)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
637
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
638 (defun YaTeX::settowidth (&optional argp)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
639 "YaTeX add-in function for arguments of \\settowidth."
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
640 (cond
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
641 ((equal 1 argp)
49
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
642 (YaTeX-cplread-with-learning
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
643 "Length variable: "
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
644 'YaTeX:style-parameters-default
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
645 'YaTeX:style-parameters-private
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
646 'YaTeX:style-parameters-local
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
647 nil nil "\\"))
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
648 ((equal 2 argp)
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
649 (read-string "Text: "))))
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
650
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
651 (defun YaTeX::newlength (&optional argp)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
652 "YaTeX add-in function for arguments of \\newlength"
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
653 (cond
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
654 ((equal argp 1)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
655 (let ((length (read-string "Length variable: " "\\")))
49
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
656 (if (string< "" length)
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
657 (YaTeX-update-table
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
658 (list length)
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
659 'YaTeX:style-parameters-default
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
660 'YaTeX:style-parameters-private
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
661 'YaTeX:style-parameters-local))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
662 length))))
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
663
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
664 ;; \multicolumn's arguments
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
665 (defun YaTeX::multicolumn (&optional argp)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
666 "YaTeX add-in function for arguments of \\multicolumn."
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
667 (cond
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
668 ((equal 1 argp)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
669 (read-string "Number of columns: "))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
670 ((equal 2 argp)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
671 (let (c)
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
672 (while (not (string-match
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
673 (progn (message "Format(one of l,r,c): ")
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
674 (setq c (char-to-string (read-char))))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
675 "lrc")))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
676 c))
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
677 ((equal 3 argp)
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
678 (read-string "Item: "))))
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
679
49
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
680 (defvar YaTeX:documentstyles-default
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
681 '(("article") ("jarticle") ("j-article")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
682 ("book") ("jbook") ("j-book")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
683 ("report") ("jreport") ("j-report")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
684 ("letter") ("ascjletter"))
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
685 "List of LaTeX documentstyles.")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
686 (defvar YaTeX:documentstyles-private nil
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
687 "*User defined list of LaTeX documentstyles.")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
688 (defvar YaTeX:documentstyles-local nil
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
689 "*User defined list of local LaTeX documentstyles.")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
690 (defvar YaTeX:documentstyle-options-default
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
691 '(("a4j") ("a5j") ("b4j") ("b5j")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
692 ("twocolumn") ("jtwocolumn") ("epsf") ("epsfig") ("epsbox") ("nfig"))
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
693 "List of LaTeX documentstyle options.")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
694 (defvar YaTeX:documentstyle-options-private nil
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
695 "*User defined list of LaTeX documentstyle options.")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
696 (defvar YaTeX:documentstyle-options-local nil
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
697 "List of LaTeX local documentstyle options.")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
698
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
699 (defvar YaTeX-minibuffer-completion-map nil
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
700 "Minibuffer completion key map that allows comma completion.")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
701 (if YaTeX-minibuffer-completion-map nil
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
702 (setq YaTeX-minibuffer-completion-map
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
703 (copy-keymap minibuffer-local-completion-map))
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
704 (define-key YaTeX-minibuffer-completion-map " "
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
705 'YaTeX-minibuffer-complete)
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
706 (define-key YaTeX-minibuffer-completion-map "\t"
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
707 'YaTeX-minibuffer-complete))
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
708
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
709 (defun YaTeX:documentstyle ()
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
710 (let*((delim ",")
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
711 (dt (append YaTeX:documentstyle-options-local
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
712 YaTeX:documentstyle-options-private
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
713 YaTeX:documentstyle-options-default))
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
714 (minibuffer-completion-table dt)
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
715 (opt (read-from-minibuffer
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
716 "Style options ([opt1,opt2,...]): "
51
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
717 nil YaTeX-minibuffer-completion-map nil))
49
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
718 (substr opt) o)
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
719 (if (string< "" opt)
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
720 (progn
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
721 (while substr
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
722 (setq o (substring substr 0 (string-match delim substr)))
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
723 (or (assoc o dt)
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
724 (YaTeX-update-table
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
725 (list o)
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
726 'YaTeX:documentstyle-options-default
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
727 'YaTeX:documentstyle-options-private
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
728 'YaTeX:documentstyle-options-local))
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
729 (setq substr
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
730 (if (string-match delim substr)
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
731 (substring substr (1+ (string-match delim substr))))))
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
732 (concat "[" opt "]"))
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
733 "")))
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
734
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
735 (defun YaTeX::documentstyle (&optional argp)
51
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
736 "YaTeX add-in function for arguments of \\documentstyle."
49
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
737 (cond
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
738 ((equal argp 1)
51
b0371b6ed799 Created `ChangeLog'.
yuuji
parents: 49
diff changeset
739 (setq env-name "document")
49
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
740 (let ((sname
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
741 (YaTeX-cplread-with-learning
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
742 (format "Documentstyle (default %s): "
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
743 YaTeX-default-document-style)
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
744 'YaTeX:documentstyles-default
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
745 'YaTeX:documentstyles-private
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
746 'YaTeX:documentstyles-local)))
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
747 (if (string= "" sname) (setq sname YaTeX-default-document-style))
69
807c1e7e68b7 yahtml-escape-chars-region
yuuji
parents: 68
diff changeset
748 (setq YaTeX-default-document-style sname)))))
49
eb0512bfcb7f Abolish user-article table.
yuuji
parents: 48
diff changeset
749
57
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
750 ;;; -------------------- LaTeX2e stuff --------------------
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
751 (defvar YaTeX:documentclass-options-default
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
752 '(("a4paper") ("a5paper") ("b5paper") ("10pt") ("11pt") ("12pt")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
753 ("latterpaper") ("legalpaper") ("executivepaper") ("landscape")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
754 ("oneside") ("twoside") ("draft") ("final") ("leqno") ("fleqn") ("openbib")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
755 ("clock") ;for slides class only
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
756 )
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
757 "Default options list for documentclass")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
758 (defvar YaTeX:documentclass-options-private nil
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
759 "*User defined options list for documentclass")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
760 (defvar YaTeX:documentclass-options-local nil
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
761 "*User defined options list for local documentclass")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
762
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
763 (defun YaTeX:documentclass ()
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
764 (let*((delim ",")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
765 (dt (append YaTeX:documentclass-options-local
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
766 YaTeX:documentclass-options-private
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
767 YaTeX:documentclass-options-default))
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
768 (minibuffer-completion-table dt)
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
769 (opt (read-from-minibuffer
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
770 "Documentclass options ([opt1,opt2,...]): "
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
771 nil YaTeX-minibuffer-completion-map nil))
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
772 (substr opt) o)
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
773 (if (string< "" opt)
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
774 (progn
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
775 (while substr
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
776 (setq o (substring substr 0 (string-match delim substr)))
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
777 (or (assoc o dt)
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
778 (YaTeX-update-table
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
779 (list o)
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
780 'YaTeX:documentclass-options-default
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
781 'YaTeX:documentclass-options-private
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
782 'YaTeX:documentclass-options-local))
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
783 (setq substr
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
784 (if (string-match delim substr)
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
785 (substring substr (1+ (string-match delim substr))))))
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
786 (concat "[" opt "]"))
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
787 "")))
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
788
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
789 (defvar YaTeX:documentclasses-default
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
790 '(("article") ("jarticle") ("report") ("jreport") ("book") ("jbook")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
791 ("j-article") ("j-report") ("j-book")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
792 ("letter") ("slides") ("ltxdoc") ("ltxguide") ("ltnews") ("proc"))
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
793 "Default documentclass alist")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
794 (defvar YaTeX:documentclasses-private nil
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
795 "*User defined documentclass alist")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
796 (defvar YaTeX:documentclasses-local nil
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
797 "*User defined local documentclass alist")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
798 (defvar YaTeX-default-documentclass (if YaTeX-japan "jarticle" "article")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
799 "*Default documentclass")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
800
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
801 (defun YaTeX::documentclass (&optional argp)
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
802 (cond
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
803 ((equal argp 1)
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
804 (setq env-name "document")
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
805 (let ((sname
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
806 (YaTeX-cplread-with-learning
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
807 (format "Documentclass (default %s): " YaTeX-default-documentclass)
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
808 'YaTeX:documentclasses-default
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
809 'YaTeX:documentclasses-private
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
810 'YaTeX:documentclasses-local)))
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
811 (if (string= "" sname) (setq sname YaTeX-default-documentclass))
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
812 (setq YaTeX-default-documentclass sname)))))
18f4939986e6 (j)LaTeX2e supported
yuuji
parents: 53
diff changeset
813
68
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
814 (defun YaTeX:caption ()
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
815 (setq section-name "label")
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
816 nil)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
817
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
818 ;;; -------------------- math-mode stuff --------------------
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
819 (defun YaTeX::tilde (&optional pos)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
820 "For accent macros in mathmode"
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
821 (cond
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
822 ((equal pos 1)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
823 (message "Put accent on variable: ")
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
824 (let ((v (char-to-string (read-char))) (case-fold-search nil))
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
825 (message "")
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
826 (cond
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
827 ((string-match "i\\|j" v)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
828 (concat "\\" v "math"))
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
829 ((string-match "[\r\n\t ]" v)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
830 "")
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
831 (t v))))
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
832 (nil "")))
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
833
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
834 (fset 'YaTeX::hat 'YaTeX::tilde)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
835 (fset 'YaTeX::check 'YaTeX::tilde)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
836 (fset 'YaTeX::bar 'YaTeX::tilde)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
837 (fset 'YaTeX::dot 'YaTeX::tilde)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
838 (fset 'YaTeX::ddot 'YaTeX::tilde)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
839 (fset 'YaTeX::vec 'YaTeX::tilde)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
840
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
841 (defun YaTeX::widetilde (&optional pos)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
842 "For multichar accent macros in mathmode"
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
843 (cond
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
844 ((equal pos 1)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
845 (let ((m "Put over chars[%s ]: ") v v2)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
846 (message m " ")
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
847 (setq v (char-to-string (read-char)))
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
848 (message "")
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
849 (if (string-match "[\r\n\t ]" v)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
850 ""
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
851 (message m v)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
852 (setq v2 (char-to-string (read-char)))
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
853 (message "")
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
854 (if (string-match "[\r\n\t ]" v2)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
855 v
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
856 (concat v v2)))))
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
857 (nil "")))
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
858
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
859 (fset 'YaTeX::widehat 'YaTeX::widetilde)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
860 (fset 'YaTeX::overline 'YaTeX::widetilde)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
861 (fset 'YaTeX::overrightarrow 'YaTeX::widetilde)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
862
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
863
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
864 ;;;
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
865 ;; Add-in functions for large-type command.
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
866 ;;;
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
867 (defun YaTeX:em ()
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
868 (cond
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
869 ((eq YaTeX-current-completion-type 'large) "\\/")
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
870 (t nil)))
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
871 (fset 'YaTeX:it 'YaTeX:em)
0eb6997bee16 More adjustment for Emacs20 and XEmacs
yuuji
parents: 64
diff changeset
872
23
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
873 ;;; -------------------- End of yatexadd --------------------
b00c74813e56 Change the YaTeX-math-mode's prefix from `,' to `;'.
yuuji
parents: 18
diff changeset
874 (provide 'yatexadd)

yatex.org