.emacs for PSTrick user


/ Published in: Emacs Lisp
Save to your folder(s)

just paste it to your .emacs


Copy this code and paste it in your HTML
  1. ; dvips
  2. (defun my-dvips nil
  3. (interactive)
  4. (shell-command
  5. (concat "dvips " (substring (buffer-name) 0 -4) ".dvi")))
  6. (global-set-key "\C-cps" ' my-dvips )
  7. ; evince (PostScript viewer)
  8. (defun my-evince nil
  9. (interactive)
  10. (shell-command
  11. (concat "evince " (substring (buffer-name) 0 -4) ".ps &")))
  12. (global-set-key "\C-cpp" ' my-evince )
  13. ; dvips -E -o output.eps input.dvi
  14. (defun my-dvips-eps nil
  15. (interactive)
  16. (setq my-dvips-eps-filename (substring (buffer-name) 0 -4))
  17. (shell-command
  18. (concat "dvips -E -o" my-dvips-eps-filename ".eps "
  19. my-dvips-eps-filename ".dvi")))
  20. (global-set-key "\C-cEps" ' my-dvips-eps)

URL: http://arataka.wordpress.com/2008/04/13/pstrick%e3%81%8c%e4%bd%bf%e3%81%84%e3%82%84%e3%81%99%e3%81%8f%e3%81%aa%e3%82%8b%ef%bc%88%e3%81%8b%e3%82%82%e3%81%97%e3%82%8c%e3%81%aa%e3%81%84%ef%bc%89emacs/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.