Emacs: TeX support for spaces in file names.
parent
8f259e469c
commit
c1705603c6
|
@ -227,7 +227,7 @@ WARNING: the -shell-escape option is a potential security issue."
|
||||||
(if (equal current-prefix-arg '(4)) (setq tex-my-shell-escape "-shell-escape")
|
(if (equal current-prefix-arg '(4)) (setq tex-my-shell-escape "-shell-escape")
|
||||||
(setq tex-my-shell-escape ""))
|
(setq tex-my-shell-escape ""))
|
||||||
|
|
||||||
(setq tex-my-compile-command (concat tex-my-compiler " " tex-my-shell-escape " " tex-my-compiler-options " " tex-my-startcommands " " buffer-file-name))
|
(setq tex-my-compile-command (concat tex-my-compiler " " tex-my-shell-escape " " tex-my-compiler-options " " tex-my-startcommands " \"" buffer-file-name "\""))
|
||||||
;; (message tex-my-compile-command) ;; Debug only.
|
;; (message tex-my-compile-command) ;; Debug only.
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(setq compilation-scroll-output t)
|
(setq compilation-scroll-output t)
|
||||||
|
@ -278,11 +278,14 @@ your document embeds raster graphics."
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun tex-pdf-view ()
|
(defun tex-pdf-view ()
|
||||||
"Call a PDF viewer for current buffer file."
|
"Call a PDF viewer for current buffer file. File name should be
|
||||||
|
properly escaped with double-quotes in case it has spaces."
|
||||||
(interactive)
|
(interactive)
|
||||||
(shell-command
|
(shell-command
|
||||||
(concat tex-my-viewer " "
|
(concat tex-my-viewer
|
||||||
(replace-regexp-in-string "\.tex$" "\.pdf &" (file-name-nondirectory buffer-file-name))
|
" \""
|
||||||
|
(replace-regexp-in-string "\.tex$" "\.pdf" (file-name-nondirectory buffer-file-name))
|
||||||
|
"\" &"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(delete-windows-on "*Async Shell Command*")
|
(delete-windows-on "*Async Shell Command*")
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
%% Graphics
|
%% Graphics
|
||||||
|
|
||||||
%% Load TikZ after xcolor.
|
%% Load TikZ after xcolor.
|
||||||
% \usepackage[svgnames]{xcolor}
|
\usepackage[svgnames]{xcolor}
|
||||||
% \usepackage{graphicx}
|
% \usepackage{graphicx}
|
||||||
% \usepackage{tikz}
|
% \usepackage{tikz}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue