diff --git a/help/YATEXHLP.eng b/help/YATEXHLP.eng index 2b786da..423f9c3 100644 --- a/help/YATEXHLP.eng +++ b/help/YATEXHLP.eng @@ -1210,6 +1210,12 @@ *, **, etc. within pages, then \footnote[2]{...} produces footnote '**'. This command does not step the footnote counter. + +If you want footnote number as marks, define as follows in preamble; +\renewcommand{\thefootnote}{\fnsymbol{footnote}} + +The next definition produces dagger marks followed by sequential number. +\renewcommand{\thefootnote}{$\dagger$\arabic{footnote}} (fragile) footnotemark diff --git a/help/YATEXHLP.jp b/help/YATEXHLP.jp index ce02ac7..494f59e 100644 --- a/help/YATEXHLP.jp +++ b/help/YATEXHLP.jp @@ -1203,6 +1203,12 @@ �r�������܂��o�͂���Ȃ��悤�ȏꏊ�ł� \footnotemark �� \footnotetext �� �g�ݍ��킹�ďo�͂���B fragile +�_�K�[(��)�ɂ���ȂǁC�L���ɂ������Ƃ��̓v���A���u���� +\renewcommand{\thefootnote}{\fnsymbol{footnote}} +�Ƃ���B +��1, ��2, ...�ɂ������Ƃ��� +\renewcommand{\thefootnote}{$\dagger$\arabic{footnote}} + footnotemark \footnotemark[NUM] @@ -1618,7 +1624,7 @@ color \color{�F} -�y�[�W�̕����H���u�F�v�ɐݒ肷��B +�y�[�W�̕����F���u�F�v�ɐݒ肷��B diff --git a/yahtml.el b/yahtml.el index c8176b9..70c622f 100644 --- a/yahtml.el +++ b/yahtml.el @@ -1,6 +1,6 @@ ;;; -*- Emacs-Lisp -*- ;;; (c) 1994-2006 by HIROSE Yuuji [yuuji@yatex.org] -;;; Last modified Sun Dec 24 15:12:35 2006 on firestorm +;;; Last modified Tue Jun 16 10:11:50 2009 on firestorm ;;; $Id$ (defconst yahtml-revision-number "1.72" @@ -235,7 +235,7 @@ (defvar yahtml-use-css t "*Use stylesheet or not") -(defvar yahtml-image-inspection-bytes 10000 ;256 +(defvar yahtml-image-inspection-bytes 50000 ;256 "*Number of bytes to inspect the image for geometry information") (defvar yahtml:img-default-alt-format "%xx%y(%sbytes)" "*Default format of img entity's ALT attributes. @@ -1739,7 +1739,8 @@ "browser" pb shell-file-name yahtml-shell-command-option (format "%s \"%s\"" yahtml-www-browser href))) 'yahtml-netscape-sentinel)) - ((and (string-match "[Nn]etscape" yahtml-www-browser) + ((and (string-match + "[Nn]etscape\\|[Ff]irefox\\|[Mm]ozilla" yahtml-www-browser) (not (eq system-type 'windows-nt))) (if (get-buffer pb) (progn (set-buffer pb) (erase-buffer) (set-buffer cb))) @@ -2688,6 +2689,56 @@ (open-line 1) (YaTeX-reindent c)))))) +(defun yahtml-intelligent-newline-table () + (let ((cp (point)) (p (point)) tb rb (cols 0) th line (i 0) fmt + (ptn "\\(\\)\\|")) + (cond + ((save-excursion (setq tb (YaTeX-beginning-of-environment "table"))) + (while (and (setq rb (re-search-backward ptn tb t)) + (match-beginning 1)) + (setq th (looking-at " cols 0) + (message "%s columns found. %s" + cols (if YaTeX-japan "�V����tr(N)? �O��tr�̕���?(D)?: " + "New tr?(N) or Duplicate"))) + (cond + ((and (> cols 0) + (memq (read-char) '(?d ?D))) ;Duplication mode + (setq line (YaTeX-buffer-substring (point) cp))) + (t ;empty cells + (setq line "" i 0) + (if (> cols 0) + (while (> cols i) + (setq line (concat line (if (and (= i 0) th) "" + "")) + th nil i (1+ i))) + (setq fmt (read-string "`th' or `td' format: " "th td td")) + (while (string-match "t\\(h\\)\\|td" fmt i) + (setq line (concat line (if (match-beginning 1) "" + "")) + i (match-end 0)))) + (setq line (concat line "")))) + (goto-char cp) + (if th + (message + "Type `%s' to change td from/to th." + (key-description (car (where-is-internal 'yahtml-change-*))))) + (if (string< "" line) + (progn + (insert line) + (goto-char (+ 8 cp)) + (yahtml-indent-line))))))) + ;;; ---------- Marking ---------- (defun yahtml-mark-begend () "Mark current tag" @@ -2765,13 +2816,13 @@ (setq e (point)) (goto-char b) (while (re-search-forward ;����Ƃ���������REGEXP - "\\([a-z][-a-z0-9]*\\)?\\.\\([-a-z0-9][-a-z0-9]*\\)\\>" + "\\([a-z*][-a-z0-9]*\\)?\\.\\([-a-z0-9][-a-z0-9]*\\)\\>" e t) (setq element (YaTeX-match-string 1) class (YaTeX-match-string 2)) ;;if starts with period (match-string 1 is nil), ;;this is global class - (setq element (downcase (or element "global"))) + (setq element (downcase (or element "*"))) (if (setq a (assoc element alist)) (or (assoc class (cdr a)) (setcdr a (cons (list class) (cdr a)))) @@ -2787,13 +2838,19 @@ (defun yahtml-css-collect-classes-file (file &optional initial) (let*((hilit-auto-highlight nil) - (openedp (get-file-buffer file)) - (cb (current-buffer)) - (buf (set-buffer (find-file-noselect file)))) - (prog1 - (yahtml-css-collect-classes-buffer initial) - (or openedp (kill-buffer buf)) - (set-buffer cb)))) + (buf (get-buffer-create + (format " *css-collection*%s" (file-name-nondirectory file)))) + (cb (current-buffer))) + (unwind-protect + (progn + (set-buffer buf) + (insert-file-contents file) + (cd (or (file-name-directory file) ".")) + (yahtml-css-collect-classes-buffer initial)) + (if (eq buf cb) + nil + (kill-buffer buf) + (set-buffer cb))))) (defun yahtml-css-scan-styles () (save-excursion @@ -2825,7 +2882,7 @@ (defun yahtml-css-get-element-completion-alist (element) (let ((alist (cdr-safe (assoc (downcase element) yahtml-css-class-alist))) - (global (cdr-safe (assoc "global" yahtml-css-class-alist)))) + (global (cdr-safe (assoc "*" yahtml-css-class-alist)))) (and (or alist global) (append alist global)))) diff --git a/yatex.el b/yatex.el index 4f3e1c0..6cc8545 100644 --- a/yatex.el +++ b/yatex.el @@ -1,15 +1,15 @@ ;;; -*- Emacs-Lisp -*- ;;; Yet Another tex-mode for emacs - //�쒹// -;;; yatex.el rev. 1.73 -;;; (c)1991-2006 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Dec 24 15:12:43 2006 on firestorm +;;; yatex.el rev. 1.73.1 +;;; (c)1991-2007 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Tue Nov 6 10:17:53 2007 on firestorm ;;; $Id$ ;;; The latest version of this software is always available at; ;;; http://www.yatex.org/ (require 'comment) (require 'yatexlib) -(defconst YaTeX-revision-number "1.73" +(defconst YaTeX-revision-number "1.73.1" "Revision number of running yatex.el") ;---------- Local variables ---------- @@ -383,6 +383,8 @@ ("Sigma") ("Upsilon") ("Phi") ("Psi") ("Omega"))) (if YaTeX-use-LaTeX2e '(("return") ("Return") ("yen"))) ;defined in ascmac + (if YaTeX-use-AMS-LaTeX + '(("nonumber"))) ) "Default completion table for maketitle-type completion.") @@ -543,7 +545,8 @@ 0: no-converion (mule) 1: Shift JIS 2: JIS -3: EUC") +3: EUC +4: UTF-8") (defvar YaTeX-coding-system nil "File coding system used by Japanese TeX.") (cond @@ -1454,9 +1457,9 @@ ((= c ?j) (YaTeX-typeset-buffer)) ((= c ?r) (YaTeX-typeset-region)) ((= c ?b) (YaTeX-call-command-on-file - bibtex-command "*YaTeX-bibtex*")) + bibtex-command "*YaTeX-bibtex*" YaTeX-parent-file)) ((= c ?i) (YaTeX-call-command-on-file - makeindex-command "*YaTeX-makeindex*")) + makeindex-command "*YaTeX-makeindex*" YaTeX-parent-file)) ((= c ?k) (YaTeX-kill-typeset-process YaTeX-typeset-process)) ((= c ?p) (call-interactively 'YaTeX-preview)) ((= c ?q) (YaTeX-system "lpq" "*Printer queue*")) @@ -1648,7 +1651,8 @@ (if (not (YaTeX-on-includes-p)) nil (let ((parent buffer-file-name) input-file b) (save-excursion - (if (search-forward "{" (point-end-of-line) t) + (if (and (re-search-forward "[{%]" (point-end-of-line) t) + (= ?{ (char-after (match-beginning 0)))) nil (skip-chars-backward "^,{")) (setq input-file @@ -1917,7 +1921,7 @@ (defun YaTeX-on-includes-p () (save-excursion (beginning-of-line) - (re-search-forward "\\(\\(include.*\\)\\|\\(input\\)\\){.*}" + (re-search-forward "\\(\\(include[^}]*\\)\\|\\(input\\)\\){[^}]*}" (point-end-of-line) t))) (defun YaTeX-on-comment-p (&optional sw) diff --git a/yatex.new b/yatex.new index f8f7ed0..c36e7b6 100644 --- a/yatex.new +++ b/yatex.new @@ -1,6 +1,12 @@ What's new in YaTeX/yahtml �쒹/yahtml - �e�o�[�W�����̕ύX�_�ɂ‚��� +1.74 === yahtml === + [prefix] Return Intelligent-newline ��table�Ή��ɂ����B + css�t�@�C������@import���������Ƃ��̃o�O�������B + css�� *.class ���߂��C���B + yahtml-image-inspection-bytes ��50000�ɑ��₵���B + 1.73 === yatex === C-i (YaTeX-indent-line) ��tabular/array�‹��Ή��B�s���ʒu�� tabular�I�J�����ʒu�ɉ����ăC���f���g�̐[����4�����[������B diff --git a/yatex.prj b/yatex.prj index 350b074..f0fd528 100644 --- a/yatex.prj +++ b/yatex.prj @@ -8,15 +8,37 @@ ("setlength" 2 ))) ***������͌��e�[�u���ł͂Ȃ��A�A�h�C���֐��Ƃ��đΏ�����悤�ɂ����B +�yyahtml - �� foo.java �ɔ�ԁz �� +�yreftex��survey�z +�yyahtml - id="foo" ��S�Ẵ^�O�̑����l�Ɂz ��? (�����l�ւ̑���͕ϐ����� + �Œ艻���Ȃ����Ƃɂ���) �y[prefix] > ��begin/end��ł̃R�����g�̌x���z �� �ymark begin to end�z �� �yDemacs: dviout�N�����O��ɃJ�[�\�� on/off�z �� �y\ref,\label�̑Ή��̕s�����͂ǂ�����?�z -�y\ref,\label �W�����v���܂��B���@�\�z -�y\ref�⊮�Ōォ��\label��郂�[�h�z -�y\[����ꂽ����\]�����Ď����C���f���g�Ȃǁz -�y�I�����C���w���v�z - +�y\ref�⊮�Ōォ��\label��郂�[�h�z �� +�y\[����ꂽ����\]�����Ď����C���f���g�Ȃǁz �� +�y�I�����C���w���v�z �����{��Ŋ��� +�y�v���Z�X���� default-directory ��(cd)�ʼn��Ƃ�����z ��(cd����悤�ɂ���) +�y�q�t�@�C���̃v���A���u����texput.tex�ɓ��ꂽ�� �ł���΍ċA�I�Ɂz �� +�y�Z�N�V�����R�}���h��p�̕⊮����͂�~�����z ��(view-sectioning) +�ysection�^�̈����� [prefix] c�z �� +�yequation�ł̃C���f���g�z �� +�y[prefix] c �ŃC���[�W�⊮�����ς�����z �� +�yinclude���Ă�t�@�C����tree�\���z �� +�ysection�^�̃V���[�g�J�b�g�z �� +�y\leftarrow�Ȃǂ�$$�ň͂ށz �� +�y�S�t�@�C���ɑ΂��� section-overview�z +�ykill-env �������ɒ��̃C���f���g��1���x�������z +�ysection�^��maketitle�^�̓����z +�ydocumentstyle�̈�������jump file�z +�yfill��������~�̌��ɋ󔒂������Ă��܂��z +�yyahtml: �C���f���g�z �� +�yyahtml: ���C�����s�z �� +�yyahtml: change-*�z �� (���Ή��̌`��������) +�yauto-fill ���� \verb|xx| protect�z �� +�ytabular�̃C���f���g(;_;)�z +�ykill-*�����̂�kill-ring�ɓ����z �� Local Variables: diff --git a/yatex19.el b/yatex19.el index 947e565..c630caf 100644 --- a/yatex19.el +++ b/yatex19.el @@ -1,7 +1,7 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX facilities for Emacs 19 ;;; (c)1994-2006 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Mon Jun 26 11:31:34 2006 on firestorm +;;; Last modified Sun Feb 11 09:19:12 2007 on firestorm ;;; $Id$ ;(require 'yatex) @@ -447,9 +447,11 @@ ("``" "''" string) ("\\\\\\(new\\|clear\\(double\\)?\\)page\\>\\|\\\\\\(\\\\\\|cr\\)\\>" 0 delimiter) - (YaTeX-19-re-search-in-env - ("&\\|\\\\hline" . "tabular\\|equation\\|eqn\\|array\\|align") delimiter) - (YaTeX-19-re-search-in-env ("\\\\[+-=><'`]" . "tabbing") delimiter) + ;; re-search-in-env seems to make it slow down. 2007/2/11 + ;;(YaTeX-19-re-search-in-env + ;; ("&\\|\\\\hline" . "tabular\\|equation\\|eqn\\|array\\|align") delimiter) + ;;(YaTeX-19-re-search-in-env ("\\\\[+-=><'`]" . "tabbing") delimiter) + ("&\\|\\\\hline\\|\\\\[+-=><'`]" 0 delimiter) ) "*Hiliting pattern alist for LaTeX text.") diff --git a/yatexadd.el b/yatexadd.el index 70934a3..29dd614 100644 --- a/yatexadd.el +++ b/yatexadd.el @@ -2,7 +2,7 @@ ;;; YaTeX add-in functions. ;;; yatexadd.el rev.18 ;;; (c)1991-2006 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Dec 24 15:12:30 2006 on firestorm +;;; Last modified Fri Sep 21 11:44:42 2007 on firestorm ;;; $Id$ ;;; @@ -796,7 +796,7 @@ "\\)\\|\\(" YaTeX::ref-labeling-regexp "\\)")) (itemsep (concat YaTeX-ec-regexp "\\(\\(bib\\)?item\\|begin\\|end\\)")) - (refcmd (or refcmd "ref")) + (refcmd (or refcmd "\\(page\\)?ref")) (p (point)) initl line cf (percent (regexp-quote YaTeX-comment-prefix)) (output @@ -1097,8 +1097,12 @@ (switch-to-buffer buf) (goto-char p) (if (re-search-backward - (concat "\\\\" refcmd "{\\([^}]+\\)}") nil t) - (setq label (YaTeX-match-string 1)) + (concat "\\\\" refcmd "{") nil t) + (setq label (YaTeX-buffer-substring + (progn (goto-char (1- (match-end 0))) + (1+ (point))) + (progn (forward-list 1) + (1- (point))))) (setq label "")))) ((>= line (+ lnum 2)) (setq label (read-string (format "\\%s{???}: " refcmd)))) @@ -1565,11 +1569,14 @@ (setq YaTeX-default-document-style sname))))) (defun YaTeX::include (argp &optional prompt) + "Read file name setting default directory to that of main file." (cond ((= argp 1) - (let*((insert-default-directory) - (file (read-file-name (or prompt "Input file: ") ""))) - (setq file (substring file 0 (string-match "\\.tex$" file))))))) + (save-excursion + (YaTeX-visit-main t) + (let*((insert-default-directory) + (file (read-file-name (or prompt "Input file: ") ""))) + (setq file (substring file 0 (string-match "\\.tex$" file)))))))) (fset 'YaTeX::input 'YaTeX::include) @@ -1764,6 +1771,10 @@ "Add-in for \\includegraphics" (YaTeX::include argp "Image File: ")) +(defun YaTeX::verbfile (argp) + "Add-in for \\verbfile" + (YaTeX::include argp "Virbatim File: ")) + (defun YaTeX:caption () (setq YaTeX-section-name "label") nil) diff --git a/yatexlib.el b/yatexlib.el index da79703..6c88bba 100644 --- a/yatexlib.el +++ b/yatexlib.el @@ -2,7 +2,7 @@ ;;; YaTeX and yahtml common libraries, general functions and definitions ;;; yatexlib.el ;;; (c)1994-2006 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Dec 24 15:12:20 2006 on firestorm +;;; Last modified Sat Apr 18 07:32:45 2009 on firestorm ;;; $Id$ ;; General variables @@ -313,8 +313,9 @@ ;;;###autoload (defun YaTeX-define-begend-key (key env &optional map) - "Define short cut key for begin type completion both for normal -and region mode. To customize YaTeX, user should use this function." + "Define short cut key for begin type completion. +Define both strokes for normal and region mode. +To customize YaTeX, user should use this function." (YaTeX-define-begend-key-normal key env map) (if YaTeX-inhibit-prefix-letter nil (YaTeX-define-begend-region-key @@ -487,7 +488,7 @@ that gives the maximum value by the FUNC. FUNC should take an argument of its window object. Non-nil for optional third argument SELECT selects that window. This function never selects minibuffer window." - (or (and (if (and YaTeX-emacs-19 select) + (or (and (if (and YaTeX-emacs-19 select window-system) (get-buffer-window buffer t) (get-buffer-window buffer)) (progn @@ -516,7 +517,7 @@ (or select (select-window window))) (t ;if one-window (cond - ((and YaTeX-emacs-19 (get-buffer-window buffer t)) + ((and YaTeX-emacs-19 window-system (get-buffer-window buffer t)) nil) ;if found in other frame (YaTeX-default-pop-window-height (split-window-calculate-height YaTeX-default-pop-window-height) diff --git a/yatexprc.el b/yatexprc.el index 6d411c3..690a5ca 100644 --- a/yatexprc.el +++ b/yatexprc.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX process handler. ;;; yatexprc.el -;;; (c)1993-2006 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Dec 24 15:12:50 2006 on firestorm +;;; (c)1993-2007 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Thu May 7 13:47:28 2009 on firestorm ;;; $Id$ ;(require 'yatex) @@ -313,13 +313,16 @@ (defvar YaTeX-call-command-history nil "Holds history list of YaTeX-call-command-on-file.") (put 'YaTeX-call-command-history 'no-default t) -(defun YaTeX-call-command-on-file (base-cmd buffer) +(defun YaTeX-call-command-on-file (base-cmd buffer &optional file) + "Call external command BASE-CMD int the BUFFER. +By default, pass the basename of current file. Optional 3rd argument +FILE changes the default file name." (YaTeX-save-buffers) (YaTeX-typeset (read-string-with-history "Call command: " (concat base-cmd " " - (let ((me (file-name-nondirectory buffer-file-name))) + (let ((me (file-name-nondirectory (or file buffer-file-name)))) (if (string-match "\\.tex" me) (substring me 0 (match-beginning 0)) me))) @@ -330,7 +333,9 @@ "Pass the bibliography data of editing file to bibtex." (interactive) (YaTeX-save-buffers) - (YaTeX-call-command-on-file cmd "*YaTeX-bibtex*" )) + (let ((main (or YaTeX-parent-file + (progn (YaTeX-visit-main t) buffer-file-name)))) + (YaTeX-call-command-on-file cmd "*YaTeX-bibtex*" main))) (defun YaTeX-kill-typeset-process (proc) "Kill process PROC after sending signal to PROC. @@ -423,27 +428,27 @@ (defun YaTeX-preview (preview-command preview-file) "Execute xdvi (or other) to tex-preview." (interactive - (list - (read-string-with-history - "Preview command: " - (YaTeX-replace-format - (or (YaTeX-get-builtin "PREVIEW") dvi2-command) - "p" (format (cond - (YaTeX-dos "-y:%s") - (t "-paper %s")) - (YaTeX-get-paper-type))) - 'YaTeX-preview-command-history) - (read-string-with-history - "Preview file: " - (if (get 'dvi2-command 'region) - (substring YaTeX-texput-file - 0 (rindex YaTeX-texput-file ?.)) - (YaTeX-get-preview-file-name)) - 'YaTeX-preview-file-history))) - (if YaTeX-dos (setq preview-file (expand-file-name preview-file))) + (let* ((command (read-string-with-history + "Preview command: " + (YaTeX-replace-format + (or (YaTeX-get-builtin "PREVIEW") dvi2-command) + "p" (format (cond + (YaTeX-dos "-y:%s") + (t "-paper %s")) + (YaTeX-get-paper-type))) + 'YaTeX-preview-command-history)) + (file (read-string-with-history + "Preview file: " + (if (get 'dvi2-command 'region) + (substring YaTeX-texput-file + 0 (rindex YaTeX-texput-file ?.)) + (YaTeX-get-preview-file-name command)) + 'YaTeX-preview-file-history))) + (list command file))) (setq dvi2-command preview-command) ;`dvi2command' is buffer local (save-excursion (YaTeX-visit-main t) + (if YaTeX-dos (setq preview-file (expand-file-name preview-file))) (let ((pbuffer "*dvi-preview*") (dir default-directory)) (YaTeX-showup-buffer pbuffer (function (lambda (x) (nth 3 (window-edges x))))) @@ -467,9 +472,10 @@ (concat preview-command " " preview-file))) (t ;if UNIX (set-process-buffer - (start-process "preview" "*dvi-preview*" shell-file-name - YaTeX-shell-command-option - (concat preview-command " " preview-file)) + (let ((process-connection-type nil)) + (start-process "preview" "*dvi-preview*" shell-file-name + YaTeX-shell-command-option + (concat preview-command " " preview-file))) (get-buffer pbuffer)) (message (concat "Starting " preview-command @@ -662,14 +668,15 @@ (defvar YaTeX-dvi2-command-ext-alist '(("[agx]dvi\\|dviout" . ".dvi") ("ghostview\\|gv" . ".ps") - ("acroread\\|pdf\\|Preview\\|TeXShop" . ".pdf"))) + ("acroread\\|pdf\\|Preview\\|TeXShop\\|Skim" . ".pdf"))) -(defun YaTeX-get-preview-file-name () +(defun YaTeX-get-preview-file-name (&optional preview-command) "Get file name to preview by inquiring YaTeX-get-latex-command" + (if (null preview-command) (setq preview-command dvi2-command)) (let* ((latex-cmd (YaTeX-get-latex-command t)) (rin (rindex latex-cmd ? )) (fname (if (> rin -1) (substring latex-cmd (1+ rin)) "")) - (r (YaTeX-assoc-regexp dvi2-command YaTeX-dvi2-command-ext-alist)) + (r (YaTeX-assoc-regexp preview-command YaTeX-dvi2-command-ext-alist)) (ext (if r (cdr r) "")) (period)) (concat @@ -780,8 +787,9 @@ YaTeX-shell-command-option cmd)) (t (set-process-buffer - (start-process "print" "*dvi-printing*" shell-file-name - YaTeX-shell-command-option cmd) + (let ((process-connection-type nil)) + (start-process "print" "*dvi-printing*" shell-file-name + YaTeX-shell-command-option cmd)) (get-buffer lbuffer)) (message "Starting printing command: %s..." cmd))))))