comparison yatexprc.el @ 58:3a7c0c2bf16d

Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
author yuuji
date Thu, 01 Feb 1996 18:55:47 +0000
parents 18f4939986e6
children 48ac97a6b6ce
comparison
equal deleted inserted replaced
57:18f4939986e6 58:3a7c0c2bf16d
1 ;;; -*- Emacs-Lisp -*- 1 ;;; -*- Emacs-Lisp -*-
2 ;;; YaTeX process handler. 2 ;;; YaTeX process handler.
3 ;;; yatexprc.el 3 ;;; yatexprc.el
4 ;;; (c )1993-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 4 ;;; (c )1993-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
5 ;;; Last modified Thu Nov 2 19:35:16 1995 on inspire 5 ;;; Last modified Fri Feb 2 02:09:57 1996 on supra
6 ;;; $Id$ 6 ;;; $Id$
7 7
8 (require 'yatex) 8 (require 'yatex)
9 9
10 (defvar YaTeX-typeset-process nil 10 (defvar YaTeX-typeset-process nil
348 (defun YaTeX-preview (preview-command preview-file) 348 (defun YaTeX-preview (preview-command preview-file)
349 "Execute xdvi (or other) to tex-preview." 349 "Execute xdvi (or other) to tex-preview."
350 (interactive 350 (interactive
351 (list 351 (list
352 (read-string-with-history 352 (read-string-with-history
353 "Preview command: " dvi2-command 'YaTeX-preview-command-history) 353 "Preview command: "
354 (or (YaTeX-get-builtin "PREVIEW") dvi2-command)
355 'YaTeX-preview-command-history)
354 (read-string-with-history 356 (read-string-with-history
355 "Preview file[.dvi]: " 357 "Preview file[.dvi]: "
356 (if (get 'dvi2-command 'region) 358 (if (get 'dvi2-command 'region)
357 (substring YaTeX-texput-file 359 (substring YaTeX-texput-file
358 0 (rindex YaTeX-texput-file ?.)) 360 0 (rindex YaTeX-texput-file ?.))
382 (concat preview-command " " preview-file)) 384 (concat preview-command " " preview-file))
383 (get-buffer pbuffer)) 385 (get-buffer pbuffer))
384 (message 386 (message
385 (concat "Starting " preview-command 387 (concat "Starting " preview-command
386 " to preview " preview-file)))))) 388 " to preview " preview-file))))))
389 )
390
391 (defvar YaTeX-xdvi-remote-program "xdvi")
392 (defun YaTeX-xdvi-remote-search (&optional region-mode)
393 "Search string at the point on xdvi -remote window.
394 Non-nil for optional argument REGION-MODE specifies the search string
395 by region."
396 (interactive "P")
397 (let ((pb " *xdvi*") str proc)
398 (save-excursion
399 (if region-mode
400 (setq str (buffer-substring (region-beginning) (region-end)))
401 (setq str (buffer-substring
402 (point)
403 (progn (skip-chars-forward "^\n\\\\}") (point)))))
404 (message "Searching `%s'..." str)
405 (if (boundp 'MULE)
406 (define-program-coding-system
407 (regexp-quote pb) (regexp-quote YaTeX-xdvi-remote-program)
408 *euc-japan*))
409 (setq proc
410 (start-process
411 "xdvi" pb YaTeX-xdvi-remote-program
412 "-remote" (format "SloppySearch(%s) " str)
413 (concat (YaTeX-get-preview-file-name) ".dvi")))
414 (message "Searching `%s'...Done" str)))
387 ) 415 )
388 416
389 (defun YaTeX-set-virtual-error-position (file-sym line-sym) 417 (defun YaTeX-set-virtual-error-position (file-sym line-sym)
390 "Replace the value of FILE-SYM, LINE-SYM by virtual error position." 418 "Replace the value of FILE-SYM, LINE-SYM by virtual error position."
391 (cond 419 (cond

yatex.org