emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Latex single dollar math delimiter question
@ 2019-08-04  5:31 Jarmo Hurri
  2019-08-04 12:07 ` Fraga, Eric
  0 siblings, 1 reply; 7+ messages in thread
From: Jarmo Hurri @ 2019-08-04  5:31 UTC (permalink / raw)
  To: emacs-orgmode


Greetings.

Org manual says that

To avoid conflicts with currency specifications, single ‘$’ characters
are only recognized as math delimiters if the enclosed text contains at
most two line breaks, is directly attached to the ‘$’ characters with no
whitespace in between, and if the closing ‘$’ is followed by whitespace,
punctuation or a dash.

Can someone explain why the single '$' characters below are not
recognized as math delimiters?

a /complex number/ $z = a + ib,$ where

Thanks in advance.

Jarmo

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Latex single dollar math delimiter question
@ 2019-08-08 17:00 emanuel.charpentier
  2019-08-09  8:56 ` Fraga, Eric
  0 siblings, 1 reply; 7+ messages in thread
From: emanuel.charpentier @ 2019-08-08 17:00 UTC (permalink / raw)
  To: e.fraga; +Cc: emacs-orgmode

On Sun, 4 Aug 2019, Eric S Fraga had the gall to write :

> 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

A bitt too much reminescent of this xkcd [horror](
https://www.xkcd.com/1806/)...

HTH(BASIWn't)

--
Emmanuel Charpentier

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-08-09  8:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-04  5:31 Latex single dollar math delimiter question Jarmo Hurri
2019-08-04 12:07 ` Fraga, Eric
2019-08-05  8:58   ` Jarmo Hurri
2019-08-05 10:35     ` Nicolas Goaziou
2019-08-05 11:04     ` Fraga, Eric
  -- strict thread matches above, loose matches on Subject: below --
2019-08-08 17:00 emanuel.charpentier
2019-08-09  8:56 ` Fraga, Eric

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).