[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inequalities in math blocks
From: |
Eric S Fraga |
Subject: |
Re: Inequalities in math blocks |
Date: |
Tue, 05 Oct 2021 13:19:25 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) |
Slightly off-topic but, just in case anybody is interested, here is some
code I use to allow me to easily get \(...\) by typing $:
#+begin_src emacs-lisp
;; from Nicolas Richard <theonewiththeevillook@yahoo.fr>
;; Date: Fri, 8 Mar 2013 16:23:02 +0100
;; Message-ID: <87vc913oh5.fsf@yahoo.fr>
(defun yf/org-electric-dollar nil
"When called once, insert \\(\\) and leave point in between.
When called twice, replace the previously inserted \\(\\) by one $."
(interactive)
(if (and (looking-at "\\\\)") (looking-back "\\\\("))
(progn (delete-char 2)
(delete-char -2)
(insert "$"))
(insert "\\(\\)")
(backward-char 2)))
(define-key org-mode-map (kbd "$") 'yf/org-electric-dollar)
#+end_src
Typing two $ in a row inserts a single $.
--
: Eric S Fraga via Emacs 28.0.60, Org release_9.5-30-g9e71df
: Latest paper written in org: https://arxiv.org/abs/2106.05096
Re: Inequalities in math blocks, Rudolf Adamkovič, 2021/10/03
[PATCH] org-manual.org: Update links to MathJax docs, Max Nikulin, 2021/10/03
Re: Inequalities in math blocks, Rudolf Adamkovič, 2021/10/06