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