emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Logical not in org-entities.el
@ 2013-01-05 21:11 Florian Beck
  2013-01-05 22:08 ` Florian Beck
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Beck @ 2013-01-05 21:11 UTC (permalink / raw)
  To: emacs-orgmode

Hi!

org-entities contains the line:

("not" "\\textlnot{}" nil "¬" "[angled dash]" "¬" "¬")

This should be

("neg" "\\neg" t "¬" "[angled dash]" "¬" "¬")

The first line fails in math mode (i.e. "\not" is not replaced at all 
and negates/slashes the next symbol); the second works in either case.

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

* Re: Logical not in org-entities.el
  2013-01-05 21:11 Logical not in org-entities.el Florian Beck
@ 2013-01-05 22:08 ` Florian Beck
  2013-01-06  6:14   ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Beck @ 2013-01-05 22:08 UTC (permalink / raw)
  To: emacs-orgmode


> org-entities contains the line:
>
> ("not" "\\textlnot{}" nil "¬" "[angled dash]" "¬" "¬")
>
> This should be
>
> ("neg" "\\neg" t "¬" "[angled dash]" "¬" "¬")
>
> The first line fails in math mode (i.e. "\not" is not replaced at all
> and negates/slashes the next symbol); the second works in either case.

OK, so org doesn't touch anything inside a math environment at all. 
Which makes sense in a way. The confusion arises with 
org-pretty-entities because what you see is definitely not what you get.

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

* Re: Logical not in org-entities.el
  2013-01-05 22:08 ` Florian Beck
@ 2013-01-06  6:14   ` Bastien
  2013-01-06 10:40     ` Florian Beck
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2013-01-06  6:14 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-orgmode

Hi Florian,

Florian Beck <fb@miszellen.de> writes:

> The confusion arises with org-pretty-entities because
> what you see is definitely not what you get.

Mhh... not sure what you mean: what do you see that you don't get?

Thanks,

-- 
 Bastien

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

* Re: Logical not in org-entities.el
  2013-01-06  6:14   ` Bastien
@ 2013-01-06 10:40     ` Florian Beck
  2013-01-06 11:39       ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Beck @ 2013-01-06 10:40 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On 01/06/2013 07:14 AM, Bastien wrote:
> Hi Florian,
>
> Florian Beck <fb@miszellen.de> writes:
>
>> The confusion arises with org-pretty-entities because
>> what you see is definitely not what you get.
>
> Mhh... not sure what you mean: what do you see that you don't get?

With org-pretty-entities:
On display, org-entities handles all entities and displays them as 
unicode characters, even inside math blocks.
On export, org-entities only handles entities outside math. Most of the 
time it doesn't matter because the entity name is the same as the latex 
command. But in case of "$\not a$" latex export and fontification 
differ: the fontified buffer shows the angled dash (¬), the exported 
document shows a slash through the next charaxter.

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

* Re: Logical not in org-entities.el
  2013-01-06 10:40     ` Florian Beck
@ 2013-01-06 11:39       ` Bastien
  2013-01-06 22:00         ` Florian Beck
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2013-01-06 11:39 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-orgmode

Hi Florian,

Florian Beck <fb@miszellen.de> writes:

> With org-pretty-entities:
> On display, org-entities handles all entities and displays them as unicode
> characters, even inside math blocks.
> On export, org-entities only handles entities outside math. Most of the
> time it doesn't matter because the entity name is the same as the latex
> command. But in case of "$\not a$" latex export and fontification differ:
> the fontified buffer shows the angled dash (¬), the exported document shows
> a slash through the next charaxter.

In master, I added

  ("neg" "\\neg{}" nil "&not;" "[angled dash]" "¬" "¬")

in (defconst org-entities ...)

so that you can now use it to produce \\neg{} where relevant.

Thanks,

-- 
 Bastien

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

* Re: Logical not in org-entities.el
  2013-01-06 11:39       ` Bastien
@ 2013-01-06 22:00         ` Florian Beck
  2013-01-06 22:07           ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Beck @ 2013-01-06 22:00 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On 01/06/2013 12:39 PM, Bastien wrote:

> In master, I added
>
>    ("neg" "\\neg{}" nil "&not;" "[angled dash]" "¬" "¬")
>
> in (defconst org-entities ...)
>
> so that you can now use it to produce \\neg{} where relevant.

Thanks, but: \neg has to be put in math mode.

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

* Re: Logical not in org-entities.el
  2013-01-06 22:00         ` Florian Beck
@ 2013-01-06 22:07           ` Bastien
  0 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2013-01-06 22:07 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-orgmode

Hi Florian,

Florian Beck <fb@miszellen.de> writes:

> Thanks, but: \neg has to be put in math mode.

Isn't it the case for other entities as well?

-- 
 Bastien

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

end of thread, other threads:[~2013-01-06 22:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-05 21:11 Logical not in org-entities.el Florian Beck
2013-01-05 22:08 ` Florian Beck
2013-01-06  6:14   ` Bastien
2013-01-06 10:40     ` Florian Beck
2013-01-06 11:39       ` Bastien
2013-01-06 22:00         ` Florian Beck
2013-01-06 22:07           ` Bastien

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).