emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Latex single dollar math delimiter question


From: Fraga, Eric
Subject: Re: [O] Latex single dollar math delimiter question
Date: Sun, 4 Aug 2019 12:07:38 +0000

On Sunday,  4 Aug 2019 at 08:31, Jarmo Hurri wrote:
> Can someone explain why the single '$' characters below are not
> recognized as math delimiters?
>
> a /complex number/ $z = a + ib,$ where

What are you expecting?  What happens if you export the file to PDF?

By the way, you might be interested in the following configuration
snippet which makes org insert \(\) when you type a single $ (and a $ if
you type 2 of them in a row).

#+begin_src emacs-lisp :tangle "esf-org.el"
  ;; from Nicolas Richard <address@hidden>
  ;; Date: Fri, 8 Mar 2013 16:23:02 +0100
  ;; Message-ID: <address@hidden>
  (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

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-399-g4e6222



reply via email to

[Prev in Thread] Current Thread [Next in Thread]