From 5d04b870c6aa78d9f2eeb0c7d7d72fd46c991d82 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Mon, 2 Sep 2019 23:44:38 -0400 Subject: [PATCH] =?UTF-8?q?Cleanup=20LaTe=CF=87=20stuff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- global.org | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/global.org b/global.org index 673dab2..1275072 100644 --- a/global.org +++ b/global.org @@ -995,7 +995,10 @@ (define-key LaTeX-mode-map (kbd ch) 'insert-char-with-padding)) '("=" "≠" ">" "<" "≥" "≤" "⇒" "∩" "∪" "∨" "∧" "×" "⊂" "⊃")) - )) + ;; Move around commands in the Right Way™ + (modify-syntax-entry ?\\ "w" LaTeX-mode-syntax-table) + (setq subword-forward-regexp "\\W*\\(\\([\\\\[:upper:]]*\\W?\\)[[:lower:][:digit:]]*\\)") + (setq subword-backward-regexp "\\(\\(\\W\\|[[:lower:][:digit:]]\\)\\([\\\\[:upper:]]+\\W*\\)\\|\\W\\w+\\)"))) #+END_SRC *** Require @@ -1020,6 +1023,10 @@ #+BEGIN_SRC emacs-lisp ; (defvar font-latex-quote-list '(("``" "''") ("“" "”") ("<<" ">>" french) ("«" "»" french)) ; #+END_SRC + Redefine fold ellipsis + #+BEGIN_SRC emacs-lisp + (setq TeX-fold-ellipsis " …") + #+END_SRC *** Default labels #+BEGIN_SRC emacs-lisp (setq LaTeX-equation-label "e_" @@ -1169,8 +1176,8 @@ (defun wilder/TeX-insert-todonote (arg r-begin r-end) (interactive "P\nr") (if arg - (add-delimiter "\\todo[inline]{" "}{}" r-begin r-end) - (add-delimiter "\\todo{" "}{}" r-begin r-end))) + (add-delimiter "{\\todo[inline]{" "}}" r-begin r-end) + (add-delimiter "{\\todo{" "}}" r-begin r-end))) #+END_SRC Promote inline math to an align #+BEGIN_SRC emacs-lisp @@ -1209,24 +1216,13 @@ (turn-on-auto-fill) (subword-mode) (TeX-fold-mode 1) - (outshine-mode) - - ;; Move around commands in the Right Way™ - (modify-syntax-entry ?\\ "w" LaTeX-mode-syntax-table) - (setq subword-forward-regexp "\\W*\\(\\([\\\\[:upper:]]*\\W?\\)[[:lower:][:digit:]]*\\)") - (setq subword-backward-regexp "\\(\\(\\W\\|[[:lower:][:digit:]]\\)\\([\\\\[:upper:]]+\\W*\\)\\|\\W\\w+\\)") - - - - )) + (outshine-mode))) #+END_SRC -*** TODO Leftovers +*** Load compilation filters #+BEGIN_SRC emacs-lisp - (setq TeX-fold-ellipsis " …") - - (load "latex-compile-filters.el") + (load "latex-compile-filters.el") #+END_SRC - Finally load ~bibretrieve~ +*** Load ~bibretrieve~ #+BEGIN_SRC emacs-lisp (byte-recompile-directory "~/.emacs.d/bibretrieve" 0) (load "bibretrieve")