[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX] Problem with preview-latex and ghostscript in suse 10
From: |
MrJ Man |
Subject: |
[AUCTeX] Problem with preview-latex and ghostscript in suse 10 |
Date: |
Mon, 9 Oct 2006 00:09:24 -0700 (PDT) |
I have installed auctex-emacs-11.83-1.suse in suse 10,
ESP Ghostscript 8.15.0 (2004-09-22) and the auctex
part works fine, yet the preview-latex part displays
the error images; in particular, the gs process is
stalled after the generation of the preview.ps file. I
checked the variable preview-gs-init-string and input
it on the gs command prompt and nothing happened, yet
if I run the same command line with the path of the
preview.ps file appended to it, the png images are
generated normally, though with white background
colour. I have read the other reports about
ghostscript problems, however the problem appears to
have nothing to do with /invalidfileaccess (bear in
mind I am not quite familiar with postscript). What do
you think?
One more thing: I have written a minor environment
(about 100 lines, see the attached file) in emacs lisp
in order to change the input language automatically
between latex macros and the document text. I have
been using it for a couple of years and it works
pretty well; it probably has a few bugs and needs some
code cleaning, so I thought maybe someone with more
lisp experience could take a look and give me some
suggestions.
Regards
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
;;; latex-i18n.el --- Support for i18n in LaTeX documents.
;;
;; Maintainer: <address@hidden>
;; Version: 0.1
;; Keywords: i18n, wp
;; X-URL:
;;
;; Copyright 2002
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 1, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;;; Code:
(require 'latex)
;;; Setup:
(provide 'latex-i18n)
;; Keymap
(defvar latex-i18n-keymap
(let ((map(copy-keymap LaTeX-mode-map)))
(define-key map "\\" 'latex-i18n-backslash)
(define-key map "\}" 'latex-i18n-rmoustache)
(define-key map "\{" 'latex-i18n-lmoustache)
(define-key map " " 'latex-i18n-space)
(define-key map "$" 'latex-i18n-dollar)
map))
(defun latex-i18n-mode ()
(interactive)
(make-variable-buffer-local 'slash-done)
(make-variable-buffer-local 'starting-input-method)
(make-variable-buffer-local 'starting-math-input-method)
(make-variable-buffer-local 'been-in-math-mode)
(make-variable-buffer-local 'starting-moustache)
(make-variable-buffer-local 'latex-i18n-mode)
(setq latex-i18n-mode t)
(use-local-map latex-i18n-keymap))
; (set-buffer-modified-p (buffer-modified-p)))
(or (assoc 'latex-i18n-mode minor-mode-alist)
(setq minor-mode-alist (cons '(latex-i18n-mode " i18n") minor-mode-alist)))
; (or (assoc 'latex-i18n-mode minor-mode-map-alist)
; (setq minor-mode-map-alist
; (cons (cons 'latex-i18n-mode latex-i18n-keymap)
; minor-mode-map-alist)))
(defvar latex-i18n-regexp-list
'("section" "subsection" "subsubsection" "text" "author" "title" "paragraph"
"caption")
"Environments that accept input in various languages (not just ASCII")
(defun latex-i18n-backslash ()
(interactive)
;(unless(TeX-point-is-escaped)
(setq starting-input-method current-input-method)
(inactivate-input-method)
(setq slash-done t)
(insert "\\"))
(defun latex-i18n-rmoustache ()
(interactive)
(insert "\}")
(when slash-done
(save-excursion
(backward-word 2)
(if (and been-in-math-mode (looking-at "end"))
(progn (activate-input-method starting-math-input-method)
(setq been-in-math-mode nil))))
(when (texmathp)
(if (save-excursion (backward-word 2) (looking-at "begin"))
(progn (setq starting-math-input-method starting-input-method)
(setq been-in-math-mode t)
(inactivate-input-method))
(inactivate-input-method)))
(setq starting-moustache nil)
(setq slash-done nil)))
(defun latex-i18n-lmoustache ()
(interactive)
(when slash-done
(save-excursion
(backward-word 1)
(let (non-math)
(setq non-math (catch 'found
(dolist (temp latex-i18n-regexp-list)
(if (looking-at temp) (throw 'found t)))))
(if non-math (activate-input-method starting-input-method))))
(setq starting-moustache t))
(insert "\{"))
(defun latex-i18n-space ()
(interactive)
(when slash-done
(when (not starting-moustache)
(activate-input-method starting-input-method)
(setq slash-done nil)))
(insert ?\ )
(do-auto-fill))
(defun latex-i18n-dollar ()
(interactive)
(if (texmathp) (activate-input-method starting-math-input-method)
(setq starting-math-input-method current-input-method)
(inactivate-input-method))
(insert "$"))
- [AUCTeX] Problem with preview-latex and ghostscript in suse 10,
MrJ Man <=