From d9b9b0a58c9454801f4827aaf8c47b3f7ec94a7d Mon Sep 17 00:00:00 2001 From: Gianmarco Brocchi Date: Tue, 17 Dec 2019 14:29:55 +0000 Subject: [PATCH 1/3] Add cref to regexp-opt; Add \coloneqq and \eqqcolon as := and =:; Consider \widehat as \hat --- magic-latex-buffer.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/magic-latex-buffer.el b/magic-latex-buffer.el index c8b49b2..30e53a4 100644 --- a/magic-latex-buffer.el +++ b/magic-latex-buffer.el @@ -393,7 +393,7 @@ K-th ARG if succeeded." (citations (ml/command-matcher (ml/command-regexp-opt - '("label" "ref" "pageref" "vref" "eqref" "cite" "Cite" + '("label" "ref" "pageref" "vref" "eqref" "cite" "Cite" "cref" "nocite" "index" "glossary" "bibitem" "citep" "citet")) t 1)) (quotes (concat (regexp-opt `("``" "\"<" "\"`" "<<" "«") t) @@ -686,6 +686,8 @@ between BEG and END." ("\\\\to\\>" . "→") ("\\\\mapsto\\>" . "↦") ("\\\\colon\\>" . ":") ("\\\\propto\\>" . "∝") + ("\\\\coloneqq\\>" . ":=") + ("\\\\eqqcolon\\>" . "=:") ;; set ("\\\\subseteq\\>" . "⊆") ("\\\\subset\\>" . "⊂") @@ -908,6 +910,8 @@ between BEG and END." . (compose-chars (string-to-char (match-string 1)) '(cc Bc 0 60) ?・)) ("\\\\\\(?:hat\\|\\^\\){\\([^}]\\)}" . (compose-chars (string-to-char (match-string 1)) '(cc Bc 0 45) ?^)) + ("\\\\\\(?:widehat\\|\\^\\){\\([^}]\\)}" + . (compose-chars (string-to-char (match-string 1)) '(cc Bc 0 45) ?^)) ("\\\\\\(?:acute\\|'\\){\\([^}]\\)}" . (compose-chars (string-to-char (match-string 1)) '(cc Bc 0 45) ?')) ("\\\\\\(?:\"\\|H\\|ddot\\){\\([^}]\\)}" From fcd282d0e9bdd6bbf294bc5cb46d6bfc3c0372f9 Mon Sep 17 00:00:00 2001 From: Gianmarco Brocchi Date: Thu, 14 Sep 2023 14:55:01 +0200 Subject: [PATCH 2/3] Add \eqsim and link in Readme --- Readme.org | 3 +++ magic-latex-buffer.el | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Readme.org b/Readme.org index 67ec98f..83557b9 100644 --- a/Readme.org +++ b/Readme.org @@ -57,3 +57,6 @@ You can disable some features independently, if they're too fancy. ** Known Issues - Not perfectly compatible with =multiple-cursors= (but still usable) + +** Useful link +[[https://en.wikipedia.org/wiki/List_of_mathematical_symbols_by_subject][Wikipedia List of maths symbols]] diff --git a/magic-latex-buffer.el b/magic-latex-buffer.el index 30e53a4..65d28c1 100644 --- a/magic-latex-buffer.el +++ b/magic-latex-buffer.el @@ -676,7 +676,7 @@ between BEG and END." '( ;; basic ("\\\\eq\\>" . "=") ("\\\\doteq\\>" . "≐") ("\\\\equiv\\>" . "≡") - ("\\\\sim\\>" . "~") ("\\\\simeq\\>" . "≃") ("\\\\cong\\>" . "≅") + ("\\\\sim\\>" . "~") ("\\\\simeq\\>" . "≃") ("\\\\eqsim\\>" . "≂") ("\\\\cong\\>" . "≅") ("\\\\succ\\>" . "≻") ("\\\\prec\\>" . "≺") ("\\\\succeq\\>" . "≽") ("\\\\preceq\\>" . "≼") ("\\\\approx\\>" . "≒") From 389ed660fd2f2e1289634d249192f1389289d8c6 Mon Sep 17 00:00:00 2001 From: Gianmarco Brocchi Date: Thu, 14 Sep 2023 16:26:22 +0200 Subject: [PATCH 3/3] Render \widetilde as \tilde --- magic-latex-buffer.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/magic-latex-buffer.el b/magic-latex-buffer.el index 65d28c1..68d00fe 100644 --- a/magic-latex-buffer.el +++ b/magic-latex-buffer.el @@ -904,6 +904,8 @@ between BEG and END." . (compose-chars (string-to-char (match-string 1)) '(cc Bc 0 60) ?→)) ("\\\\\\(?:tilde\\|~\\){\\([^}]\\)}" . (compose-chars (string-to-char (match-string 1)) '(cc Bc 0 60) ?~)) + ("\\\\\\(?:widetilde\\|~\\){\\([^}]\\)}" + . (compose-chars (string-to-char (match-string 1)) '(cc Bc 0 60) ?~)) ("\\\\\\(?:bar\\|=\\){\\([^}]\\)}" . (compose-chars (string-to-char (match-string 1)) '(cc Bc 0 60) ?-)) ("\\\\\\(?:dot\\|\\.\\){\\([^}]\\)}"