Mercurial > hgrepos > hgweb.cgi > yatex
changeset 408:2857cac50a67 dev
When PDF output seems to occur in typesetter, use pdf-viewer in [prefix] t p.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 19 Jan 2015 09:00:07 +0900 |
parents | b423cf9b35ee |
children | 781604df4cbd |
files | yatex.new yatexprc.el |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/yatex.new Sun Jan 18 23:42:31 2015 +0900 +++ b/yatex.new Mon Jan 19 09:00:07 2015 +0900 @@ -9,6 +9,7 @@ 持続中の On-the-fly preview の無効化は何もない場所で [prefix] k。 YaTeX-help-file のデフォルト位置を site-lisp/yatex/help/ に変更。 領域活性時に呼び出す補完は領域括りになるようにした。 + タイプセットでPDF出力がありそうなときは次回previewをPDFヴューアに。 === yahtml === 領域活性時に呼び出す補完は領域括りになるようにした。 ...
--- a/yatexprc.el Sun Jan 18 23:42:31 2015 +0900 +++ b/yatexprc.el Mon Jan 19 09:00:07 2015 +0900 @@ -1,7 +1,7 @@ ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- ;;; ;;; (c)1993-2015 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Jan 18 23:17:57 2015 on firestorm +;;; Last modified Mon Jan 19 08:35:39 2015 on firestorm ;;; $Id$ ;;; Code: @@ -299,7 +299,16 @@ 'YaTeX-typeset-sentinel)) (t (if (equal 0 (process-exit-status proc)) - nil ;do nothing at successful exit + ;; Successful typesetting done + (if (save-excursion + (re-search-backward + (concat + "^Output written on .*\\.pdf (.*page," + "\\|\\.dvi -> .*\\.pdf$") + nil t)) + ;; If PDF output log found in buffer, + ;; set next default previewer to 'pdf viewer + (put 'dvi2-command 'format 'pdf)) ;;Confirm process buffer to be shown when error (YaTeX-showup-buffer pbuf 'YaTeX-showup-buffer-bottom-most)