2013-06-12 23:40:20 +02:00
|
|
|
;;==============================================================================
|
2014-02-21 15:23:25 +01:00
|
|
|
;; Texinfo using TeX setup
|
2013-06-12 23:40:20 +02:00
|
|
|
;;==============================================================================
|
2014-02-21 15:23:25 +01:00
|
|
|
(require 'mode-tex)
|
2013-06-12 23:40:20 +02:00
|
|
|
|
2013-09-28 17:22:47 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; VARIABLE
|
|
|
|
|
2014-02-21 15:23:25 +01:00
|
|
|
(defvar tex-default-compiler "texi2pdf -b"
|
|
|
|
"Default compiler for LaTeX mode. Used if `tex-compiler' is
|
|
|
|
empty.")
|
2013-06-12 23:40:20 +02:00
|
|
|
|
2014-02-21 15:23:25 +01:00
|
|
|
(defvar tex-extension-list '("aux" "cp" "cps" "fn" "ky" "log" "pg" "toc" "tp" "vr" "vrs")
|
2013-09-28 17:22:47 +02:00
|
|
|
"List of known Texinfo exentsions. This list is used by
|
|
|
|
'texinfo-clean to purge all matching files.")
|
|
|
|
|
2014-02-21 15:23:25 +01:00
|
|
|
(defcustom tex-compiler-options ""
|
|
|
|
"The options to the tex compiler. Options are set between the
|
|
|
|
compiler name and the file name.
|
2013-09-28 17:22:47 +02:00
|
|
|
|
2014-02-21 15:23:25 +01:00
|
|
|
Interesting options:
|
2013-06-12 23:40:20 +02:00
|
|
|
|
2014-02-21 15:23:25 +01:00
|
|
|
* --shell-escape: allow the use of \write18{<external command>}
|
|
|
|
from within TeX documents. This is a potential security issue.
|
2013-06-12 23:40:20 +02:00
|
|
|
|
2014-02-21 15:23:25 +01:00
|
|
|
You may use file local variable for convenience:
|
2013-06-12 23:40:20 +02:00
|
|
|
|
2014-02-21 15:23:25 +01:00
|
|
|
% -*- tex-compiler-options: \"--shell-escape\"
|
2013-06-12 23:40:20 +02:00
|
|
|
|
2014-02-21 15:23:25 +01:00
|
|
|
Note that --shell-escape can also be toggled with universal
|
|
|
|
argument."
|
|
|
|
:safe 'stringp)
|
2013-06-12 23:40:20 +02:00
|
|
|
|
2014-02-21 15:23:25 +01:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; FUNCTIONS
|
2013-06-12 23:40:20 +02:00
|
|
|
|
2013-09-28 17:22:47 +02:00
|
|
|
(defun texinfo-menu-update ()
|
2013-06-12 23:40:20 +02:00
|
|
|
"Update texinfo node menu automatically."
|
|
|
|
(interactive)
|
2013-09-28 17:22:47 +02:00
|
|
|
(hack-local-variables)
|
2013-06-12 23:40:20 +02:00
|
|
|
(let
|
|
|
|
;; Master file.
|
2013-09-28 17:22:47 +02:00
|
|
|
((local-master (if (not masterfile) buffer-file-name masterfile)))
|
2013-06-12 23:40:20 +02:00
|
|
|
|
|
|
|
(texinfo-multiple-files-update local-master t 8)))
|
|
|
|
|
2013-09-28 17:22:47 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; HOOKS
|
|
|
|
|
2013-06-12 23:40:20 +02:00
|
|
|
(add-hook
|
|
|
|
'texinfo-mode-hook
|
|
|
|
(lambda ()
|
2014-02-21 15:23:25 +01:00
|
|
|
(setq fill-column 80) ;; Really needed?
|
|
|
|
(local-set-key (kbd "C-c C-b") 'texinfo-menu-update)))
|