Mercurial > hgrepos > hgweb.cgi > yatex
comparison yatex19.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 |
comparison
equal
deleted
inserted
replaced
68:0eb6997bee16 | 69:807c1e7e68b7 |
---|---|
1 ;;; -*- Emacs-Lisp -*- | 1 ;;; -*- Emacs-Lisp -*- |
2 ;;; YaTeX facilities for Emacs 19 | 2 ;;; YaTeX facilities for Emacs 19 |
3 ;;; (c )1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] | 3 ;;; (c )1994-1999 by HIROSE Yuuji.[yuuji@gentei.org] |
4 ;;; Last modified Thu Jan 29 10:55:12 1998 on crx | 4 ;;; Last modified Thu Apr 29 18:40:26 1999 on firestorm |
5 ;;; $Id$ | 5 ;;; $Id$ |
6 | 6 |
7 ;;; とりあえず hilit19 を使っている時に色が付くようにして | 7 ;;; とりあえず hilit19 を使っている時に色が付くようにして |
8 ;;; メニューバーでごにょごにょできるようにしただけ。 | 8 ;;; メニューバーでごにょごにょできるようにしただけ。 |
9 ;;; いったい誰がメニューバー使ってLaTeXソース書くんだろうか? | 9 ;;; いったい誰がメニューバー使ってLaTeXソース書くんだろうか? |
228 ;; 引数を数えて正しい位置までピカピカさせるよ〜ん! | 228 ;; 引数を数えて正しい位置までピカピカさせるよ〜ん! |
229 | 229 |
230 (defun YaTeX-19-region-section-type (pattern) | 230 (defun YaTeX-19-region-section-type (pattern) |
231 "Return list of starting and end point of section-type commands of PATTERN." | 231 "Return list of starting and end point of section-type commands of PATTERN." |
232 (if (re-search-forward pattern nil t) | 232 (if (re-search-forward pattern nil t) |
233 (let ((m0 (match-beginning 0)) cmd (argc 1)) | 233 (let ((m0 (match-beginning 0)) (e0 (match-end 0)) cmd (argc 1)) |
234 (setq cmd (substring (YaTeX-match-string 0) 1) | 234 (setq cmd (substring (YaTeX-match-string 0) 1) |
235 argc (or (car (cdr (YaTeX-lookup-table cmd 'section))) argc)) | 235 argc (or (car (cdr (YaTeX-lookup-table cmd 'section))) argc)) |
236 (cons m0 | 236 (if (= argc 0) (cons m0 (point)) ;引数個数0ならマッチした領域 |
237 (progn ;(skip-chars-backward "^{") (forward-char -2) | 237 (skip-chars-forward " \n\t*") |
238 (while (> argc 0) | 238 (while (looking-at "\\[") (forward-list 1)) ;optionならスキップ |
239 (skip-chars-forward "^{") | 239 (skip-chars-forward " \n\t") |
240 (forward-list 1) | 240 (if (looking-at "{") ;{}が始まるならちゃんとしたsection型 |
241 (setq argc (1- argc))) | 241 (cons m0 |
242 (point)))))) | 242 (progn ;(skip-chars-backward "^{") (forward-char -2) |
243 (while (> argc 0) | |
244 (skip-chars-forward "^{") | |
245 (forward-list 1) | |
246 (setq argc (1- argc))) | |
247 (point))) | |
248 ;{}でないならたぶん \verb 環境などにあるダミー | |
249 (cons m0 e0)))))) | |
243 | 250 |
244 (defun YaTeX-19-region-large-type (pattern) | 251 (defun YaTeX-19-region-large-type (pattern) |
245 "Return list of large-type contents. | 252 "Return list of large-type contents. |
246 Assumes PATTERN begins with `{'." | 253 Assumes PATTERN begins with `{'." |
247 (if (re-search-forward pattern nil t) | 254 (if (re-search-forward pattern nil t) |
377 bB (/ (nth 2 colorvalue) 256) | 384 bB (/ (nth 2 colorvalue) 256) |
378 lm YaTeX-sectioning-max-level | 385 lm YaTeX-sectioning-max-level |
379 list YaTeX-sectioning-level) | 386 list YaTeX-sectioning-level) |
380 (while list | 387 (while list |
381 (setq pat (concat YaTeX-ec-regexp (car (car list)) | 388 (setq pat (concat YaTeX-ec-regexp (car (car list)) |
382 ;"\\*?\\(\\[[^]]*\\]\\)?\\>" | 389 ;"\\*?\\(\\[[^]]*\\]\\)?\\>" ;改行はさむと駄目 |
383 "\\>" | 390 "\\>" |
384 ) | 391 ) |
385 level (cdr (car list)) | 392 level (cdr (car list)) |
386 fg (format "hex-%02x%02x%02x" | 393 fg (format "hex-%02x%02x%02x" |
387 (- fR (/ (* level fR fmin) lm 100)) | 394 (- fR (/ (* level fR fmin) lm 100)) |