summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-05-12 11:09:39 +0800
committerJSDurand <mmemmew@gmail.com>2022-05-12 11:09:39 +0800
commit98b6120bf21041c3bf10f42c7a882b2a8a32f245 (patch)
treed38fafa4d1c58335535f64492bbfb88925ba406b
parent16470e634769d624944472095564c1410ff83a9f (diff)
tex-conf: add a command to do everything.
* tex-conf.el (durand-tex-do-all): Do everything I want. (LaTeX-mode-map): Bind to 'C-c t'.
-rw-r--r--tex-conf.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/tex-conf.el b/tex-conf.el
index 7d42aa2..1e65ace 100644
--- a/tex-conf.el
+++ b/tex-conf.el
@@ -219,6 +219,17 @@
(add-hook 'LaTeX-mode-hook #'reftex-mode)
+;;; Do it all!
+
+(defun durand-tex-do-all (arg)
+ "Do everything I want and show the PDF."
+ (interactive "P")
+ (LaTeX-fill-environment nil)
+ (save-buffer 0)
+ (TeX-command-run-all arg))
+
+(define-key LaTeX-mode-map (vector 3 ?t) #'durand-tex-do-all)
+
(define-key LaTeX-math-mode-map (LaTeX-math-abbrev-prefix) t)
(set-default 'LaTeX-math-abbrev-prefix "รน")