Mercurial > hgrepos > hgweb.cgi > yatex
comparison yatex.el @ 123:590fc51462c7 dev
New typeset menu `latex+p(D)f' added.
Call dvipdfmx when typesetting succeeded.
author | yuuji@gentei.org |
---|---|
date | Thu, 27 May 2010 10:16:56 +0900 |
parents | 34096706b634 |
children | b11d6271207e |
comparison
equal
deleted
inserted
replaced
122:57d3d9abd661 | 123:590fc51462c7 |
---|---|
1 ;;; -*- Emacs-Lisp -*- | 1 ;;; -*- Emacs-Lisp -*- |
2 ;;; Yet Another tex-mode for emacs - //–ì’¹// | 2 ;;; Yet Another tex-mode for emacs - //–ì’¹// |
3 ;;; yatex.el rev. 1.74.1 | 3 ;;; yatex.el rev. 1.74.3 |
4 ;;; (c)1991-2009 by HIROSE Yuuji.[yuuji@yatex.org] | 4 ;;; (c)1991-2010 by HIROSE Yuuji.[yuuji@yatex.org] |
5 ;;; Last modified Wed Dec 23 20:05:55 2009 on firestorm | 5 ;;; Last modified Thu May 27 10:09:18 2010 on firestorm |
6 ;;; $Id$ | 6 ;;; $Id$ |
7 ;;; The latest version of this software is always available at; | 7 ;;; The latest version of this software is always available at; |
8 ;;; http://www.yatex.org/ | 8 ;;; http://www.yatex.org/ |
9 | 9 |
10 (require 'comment) | 10 (require 'comment) |
11 (require 'yatexlib) | 11 (require 'yatexlib) |
12 (defconst YaTeX-revision-number "1.74.1" | 12 (defconst YaTeX-revision-number "1.74.3" |
13 "Revision number of running yatex.el") | 13 "Revision number of running yatex.el") |
14 | 14 |
15 ;---------- Local variables ---------- | 15 ;---------- Local variables ---------- |
16 (defvar YaTeX-prefix "\C-c" | 16 (defvar YaTeX-prefix "\C-c" |
17 "*Prefix key to call YaTeX functions. | 17 "*Prefix key to call YaTeX functions. |
79 "*`From' page format of dvi filter. %b will turn to beginning page number.") | 79 "*`From' page format of dvi filter. %b will turn to beginning page number.") |
80 | 80 |
81 (defvar dviprint-to-format | 81 (defvar dviprint-to-format |
82 (if YaTeX-dos "%e" "-t %e") | 82 (if YaTeX-dos "%e" "-t %e") |
83 "*`To' page format of dvi filter. %e will turn to end page number.") | 83 "*`To' page format of dvi filter. %e will turn to end page number.") |
84 | |
85 (defvar YaTeX-dvipdf-command | |
86 "dvipdfmx" | |
87 "*Command name to convert dvi file to PDF.") | |
84 | 88 |
85 (defvar YaTeX-default-document-style | 89 (defvar YaTeX-default-document-style |
86 (concat (if YaTeX-japan "j") "article") | 90 (concat (if YaTeX-japan "j") "article") |
87 "*Default LaTeX Documentstyle for YaTeX-typeset-region.") | 91 "*Default LaTeX Documentstyle for YaTeX-typeset-region.") |
88 | 92 |
1443 (defun YaTeX-typeset-menu (arg &optional char) | 1447 (defun YaTeX-typeset-menu (arg &optional char) |
1444 "Typeset, preview, visit error and miscellaneous convenient menu. | 1448 "Typeset, preview, visit error and miscellaneous convenient menu. |
1445 Optional second argument CHAR is for non-interactive call from menu." | 1449 Optional second argument CHAR is for non-interactive call from menu." |
1446 (interactive "P") | 1450 (interactive "P") |
1447 (message | 1451 (message |
1448 (concat "J)latex R)egion B)ibtex mk(I)ndex " | 1452 (concat "J)latex R)egion B)ibtex mk(I)dx " |
1449 (if (fboundp 'start-process) "K)ill-latex ") | 1453 "latex+p(D)f " |
1454 (if (fboundp 'start-process) "K)ill ") | |
1450 "P)review " | 1455 "P)review " |
1451 (and (boundp 'window-system) window-system "S)earch ") | 1456 (and (boundp 'window-system) window-system "S)earch ") |
1452 "V)iewerr L)pr")) | 1457 "V)iewErr L)pr")) |
1453 (let ((sw (selected-window)) (c (or char (read-char)))) | 1458 (let ((sw (selected-window)) (c (or char (read-char)))) |
1454 (require 'yatexprc) ;for Nemacs's bug | 1459 (require 'yatexprc) ;for Nemacs's bug |
1455 (select-window sw) | 1460 (select-window sw) |
1456 (cond | 1461 (cond |
1457 ((= c ?j) (YaTeX-typeset-buffer)) | 1462 ((= c ?j) (YaTeX-typeset-buffer)) |
1461 ((= c ?i) (YaTeX-call-command-on-file | 1466 ((= c ?i) (YaTeX-call-command-on-file |
1462 makeindex-command "*YaTeX-makeindex*" YaTeX-parent-file)) | 1467 makeindex-command "*YaTeX-makeindex*" YaTeX-parent-file)) |
1463 ((= c ?k) (YaTeX-kill-typeset-process YaTeX-typeset-process)) | 1468 ((= c ?k) (YaTeX-kill-typeset-process YaTeX-typeset-process)) |
1464 ((= c ?p) (call-interactively 'YaTeX-preview)) | 1469 ((= c ?p) (call-interactively 'YaTeX-preview)) |
1465 ((= c ?q) (YaTeX-system "lpq" "*Printer queue*")) | 1470 ((= c ?q) (YaTeX-system "lpq" "*Printer queue*")) |
1471 ((= c ?d) (YaTeX-typeset-buffer YaTeX-dvipdf-command)) | |
1466 ((= c ?v) (YaTeX-view-error)) | 1472 ((= c ?v) (YaTeX-view-error)) |
1467 ((= c ?l) (YaTeX-lpr arg)) | 1473 ((= c ?l) (YaTeX-lpr arg)) |
1468 ((= c ?m) (YaTeX-switch-mode-menu arg)) | 1474 ((= c ?m) (YaTeX-switch-mode-menu arg)) |
1469 ((= c ?b) (YaTeX-insert-string "\\")) | 1475 ((= c ?b) (YaTeX-insert-string "\\")) |
1470 ((= c ?s) (YaTeX-xdvi-remote-search arg))))) | 1476 ((= c ?s) (YaTeX-xdvi-remote-search arg))))) |