Fix the modeline for LaTeX

master
Jacopo De Simoi 6 years ago
parent d1eb7587bd
commit 8e3676f096
  1. 12
      global.org

@ -1030,6 +1030,15 @@
("prop" ?p "prp:" "~\\ref{%s}" prp (regexp "propositions?"))
("cor" ?c "cor:" "~\\ref{%s}" cor (regexp "corollary"))
("def" ?d "def:" "~\\ref{%s}" cor (regexp "defintions?")))))
;;; advice the auctex function to replace the
;;; lighter with somthing softer
(with-eval-after-load "auctex"
(defun cleanup-TeX-mode (&optional mode)
"Advice for the base auctex MODE naming"
(setq mode-name (replace-regexp-in-string "LaTeX" "χ" mode-name t))
(setq mode-name (replace-regexp-in-string "/" "·" mode-name)))
(advice-add 'TeX-set-mode-name :after 'cleanup-TeX-mode))
#+END_SRC
*** Setup ~latex-mode~
#+BEGIN_SRC emacs-lisp
@ -1038,6 +1047,8 @@
(font-lock-add-keywords 'latex-mode
`((,(rx "$") 0 'font-latex-sedate-face t)) t)
(defface font-latex-special-comment-face '((t (:foreground "#2aa198"))) "Cyan")
(font-lock-add-keywords 'latex-mode '(("^% \\([^*].*\\)" 1 'font-latex-special-comment-face t)))
(define-key-alist LaTeX-mode-map
@ -1080,6 +1091,7 @@
;; Force moves around to be more “semantic”
("C-v" . goto-next-comment-line)
("M-v" . goto-previous-comment-line)
("C-x n c" . narrow-between-comments)
("C-S-v" . backward-paragraph)))
(mapcar (lambda (ch)

Loading…
Cancel
Save