emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [patch][org-entities] More symbols
@ 2013-08-18 15:56 Rasmus
  2013-08-19  8:55 ` Nicolas Goaziou
  0 siblings, 1 reply; 12+ messages in thread
From: Rasmus @ 2013-08-18 15:56 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

Hi,

This patch adds some general interest(?) symbols to org entities that
otherwise lived in my init file.

1. I don't know how to easily check whether a glyph is supported by
   Latin 1, so Latin 1 entries correspond to the ASCII equivalent.

2. HTML symbols have been tested in Firefox.  In a few cases I
   couldn't find a pretty name (like "π") in which case I've
   supplied the unicode number (like "&960;").  Is that OK?  (E.g. can
   Org produce non-uft8 HTML?)

3. In LaTeX the symbols are mostly defined in amsmath, except coloneqq
   and eqqcolon which requires something like mathtools or kpfonts or
   possibly unicode-math.  Is that OK?  I also fixed some
   inconsistencies.  E.g. loz was loaded diamond even though loz is
   defined in amssymb and "~" and "\tilde" produced different results
   (the latter produces the irritating "\~{}" often observed among
   (social science?) university professors...).

–Rasmus


[-- Attachment #2: 0001-More-org-entities.patch --]
[-- Type: text/x-diff, Size: 10981 bytes --]

From ed467f7de217d9cafb74f743309e44e91ad9cf25 Mon Sep 17 00:00:00 2001
From: rasmus <rasmus@gmx.us>
Date: Sun, 18 Aug 2013 17:42:33 +0200
Subject: [PATCH] More org-entities.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* org-entities.el (org-entities): Add support for ell, imath,
jmath, varphi, varomega, varpi, aleph, gimel, beth, dalet,
cdots, S (§), dag, ddag, colon, therefore, because, coloneqq,
eqqcolon, triangleq, leq, geq, lessgtr, lesseqgtr, ll, gg,
prec, preceq, preccurleyeq, succ, succeq, succurleyeq,
setminus, nexist(s), implies, impliedby, iff, diamond.
Changes loz and tilde.

In LaTeX these symbols are mostly defined in amssymb. coloneqq and
eqqcolon require kpfonts or mathtools or similar in LaTeX.
---
 lisp/org-entities.el | 43 +++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 41 insertions(+), 2 deletions(-)

diff --git a/lisp/org-entities.el b/lisp/org-entities.el
index a1519b0..0012566 100644
--- a/lisp/org-entities.el
+++ b/lisp/org-entities.el
@@ -154,6 +154,9 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("real" "\\Re" t "&real;" "R" "R" "ℜ")
     ("image" "\\Im" t "&image;" "I" "I" "ℑ")
     ("weierp" "\\wp" t "&weierp;" "P" "P" "℘")
+    ("ell" "\\ell" t "&ell;" "ell" "ell" "ℓ")
+    ("imath" "\\imath" t "&imath;" "dotless i" "dotless i" "ı")
+    ("jmath" "\\jmath" t "&jmath;" "dotless j" "dotless j" "ȷ")
 
     "** Greek"
     ("Alpha" "A" nil "&Alpha;" "Alpha" "Alpha" "Α")
@@ -203,6 +206,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("upsilon" "\\upsilon" t "&upsilon;" "upsilon" "upsilon" "υ")
     ("Phi" "\\Phi" t "&Phi;" "Phi" "Phi" "Φ")
     ("phi" "\\phi" t "&phi;" "phi" "phi" "φ")
+    ("varphi", "\\varphi" t "&varphi;" "varphi" "varphi" "ɸ ")
     ("Chi" "X" nil "&Chi;" "Chi" "Chi" "Χ")
     ("chi" "\\chi" t "&chi;" "chi" "chi" "χ")
     ("acutex" "\\acute x" t "&acute;x" "'x" "'x" "𝑥́")
@@ -211,11 +215,17 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("tau" "\\tau" t "&tau;" "tau" "tau" "τ")
     ("Omega" "\\Omega" t "&Omega;" "Omega" "Omega" "Ω")
     ("omega" "\\omega" t "&omega;" "omega" "omega" "ω")
+    ("varomega" "\\varomega" t "&#631;" "varomega" "varomega" "ɷ")
     ("piv" "\\varpi" t "&piv;" "omega-pi" "omega-pi" "ϖ")
+    ("varpi" "\\varpi" t "&piv;" "omega-pi" "omega-pi" "ϖ")
     ("partial" "\\partial" t "&part;" "[partial differential]" "[partial differential]" "∂")
 
     "** Hebrew"
     ("alefsym" "\\aleph" t "&alefsym;" "aleph" "aleph" "ℵ")
+    ("aleph" "\\aleph" t "&alefsym;" "aleph" "aleph" "ℵ")
+    ("gimel" "\\gimel" t "&gimel;" "gimel" "gimel" "ℷ")
+    ("beth" "\\beth" t "&beth;" "beth" "beth" "ב")
+    ("dalet" "\\daleth" t "&daleth;" "dalet" "dalet" "ד")
 
     "** Dead languages"
     ("ETH" "\\DH{}" nil "&ETH;" "D" "Ð" "Ð")
@@ -227,6 +237,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     "** Dots and Marks"
     ("dots" "\\dots{}" nil "&hellip;" "..." "..." "…")
     ("hellip" "\\dots{}" nil "&hellip;" "..." "..." "…")
+    ("cdots" "\\cdots" t "&#8943;" "..." "..." "⋯")
     ("middot" "\\textperiodcentered{}" nil "&middot;" "." "·" "·")
     ("iexcl" "!`" nil "&iexcl;" "!" "¡" "¡")
     ("iquest" "?`" nil "&iquest;" "?" "¿" "¿")
@@ -255,18 +266,21 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("circ" "\\^{}" nil "&circ;" "^" "^" "ˆ")
     ("vert" "\\vert{}" t "&#124;" "|" "|" "|")
     ("brvbar" "\\textbrokenbar{}" nil "&brvbar;" "|" "¦" "¦")
+    ("S" "\\S" nil "&sect;" "paragraph" "§" "§")
     ("sect" "\\S" nil "&sect;" "paragraph" "§" "§")
     ("amp" "\\&" nil "&amp;" "&" "&" "&")
     ("lt" "\\textless{}" nil "&lt;" "<" "<" "<")
     ("gt" "\\textgreater{}" nil "&gt;" ">" ">" ">")
-    ("tilde" "\\~{}" nil "&tilde;" "~" "~" "~")
+    ("tilde" "\\textasciitilde{}" nil "&tilde;" "~" "~" "~")
     ("slash" "/" nil "/" "/" "/" "/")
     ("plus" "+" nil "+" "+" "+" "+")
     ("under" "\\_" nil "_" "_" "_" "_")
     ("equal" "=" nil "=" "=" "=" "=")
     ("asciicirc" "\\textasciicircum{}" nil "^" "^" "^" "^")
     ("dagger" "\\textdagger{}" nil "&dagger;" "[dagger]" "[dagger]" "†")
+    ("dag" "\\dag{}" nil "&dagger;" "[dagger]" "[dagger]" "†")
     ("Dagger" "\\textdaggerdbl{}" nil "&Dagger;" "[doubledagger]" "[doubledagger]" "‡")
+    ("ddag" "\\ddag{}" nil "&Dagger;" "[doubledagger]" "[doubledagger]" "‡")
 
     "** Whitespace"
     ("nbsp" "~" nil "&nbsp;" " " " " " ")
@@ -297,6 +311,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("plusmn" "\\textpm{}" nil "&plusmn;" "+-" "±" "±")
     ("times" "\\texttimes{}" nil "&times;" "*" "×" "×")
     ("frasl" "/" nil "&frasl;" "/" "/" "⁄")
+    ("colon" "\\colon" t ":" ":" ":" ":")
     ("div" "\\textdiv{}" nil "&divide;" "/" "÷" "÷")
     ("frac12" "\\textonehalf{}" nil "&frac12;" "1/2" "½" "½")
     ("frac14" "\\textonequarter{}" nil "&frac14;" "1/4" "¼" "¼")
@@ -326,7 +341,9 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("cap" "\\cap" t "&cap;" "[intersection]" "[intersection]" "∩")
     ("cup" "\\cup" t "&cup;" "[union]" "[union]" "∪")
     ("int" "\\int" t "&int;" "[integral]" "[integral]" "∫")
+    ("therefore" "\\therefore" t "&there4;" "[therefore]" "[therefore]" "∴")
     ("there4" "\\therefore" t "&there4;" "[therefore]" "[therefore]" "∴")
+    ("because" "\\because" t "&because;" "[because]" "[because]" "∵")
     ("sim" "\\sim" t "&sim;" "~" "~" "∼")
     ("cong" "\\cong" t "&cong;" "[approx. equal to]" "[approx. equal to]" "≅")
     ("simeq" "\\simeq" t "&cong;"  "[approx. equal to]" "[approx. equal to]" "≅")
@@ -335,8 +352,23 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("ne" "\\ne" t "&ne;" "[not equal to]" "[not equal to]" "≠")
     ("neq" "\\neq" t "&ne;" "[not equal to]" "[not equal to]" "≠")
     ("equiv" "\\equiv" t "&equiv;" "[identical to]" "[identical to]" "≡")
+    ("coloneqq" "\\coloneqq" t "&colone;" ":=" ":=" "≔")
+    ("eqqcolon" "\\eqqcolon" t "&ecolon;" "=:" "=:" "≕")
+    ("triangleq" "\\triangleq" t "&triangleq;" "[defined to]" "[defined to]" "≜")
     ("le" "\\le" t "&le;" "<=" "<=" "≤")
+    ("leq" "\\le" t "&le;" "<=" "<=" "≤")
     ("ge" "\\ge" t "&ge;" ">=" ">=" "≥")
+    ("geq" "\\ge" t "&ge;" ">=" ">=" "≥")
+    ("lessgtr" "\\lessgtr" t "&lessgtr;" "[less than or greater than]" "[less than or greater than]" "≶")
+    ("lesseqgtr" "\\lesseqgtr" t "&lesseqgtr;" "[less than or equal or greater than or equal]" "[less than or equal or greater than or equal]" "⋚")
+    ("ll" "\\ll" t  "&Lt;" "<<" "<<" "≪")
+    ("gg" "\\gg" t  "&Gt;" ">>" ">>" "≫")
+    ("prec" "\\prec" t "&pr;" "[precedes]" "[precedes]" "≺")
+    ("preceq" "\\preceq" t "&prcue;" "[precedes or equal]" "[precedes or equal]" "≼")
+    ("preccurlyeq" "\\preccurlyeq" t "&prcue;" "[precedes or equal]" "[precedes or equal]" "≼")
+    ("succ" "\\succ" t "&sc;" "[succeeds]" "[succeeds]" "≻")
+    ("succeq" "\\succeq" t "&sccue;" "[succeeds or equal]" "[succeeds or equal]" "≽")
+    ("succcurlyeq" "\\succeq" t "&sccue;" "[succeeds or equal]" "[succeeds or equal]" "≽")
     ("sub" "\\subset" t "&sub;" "[subset of]" "[subset of]" "⊂")
     ("subset" "\\subset" t "&sub;" "[subset of]" "[subset of]" "⊂")
     ("sup" "\\supset" t "&sup;" "[superset of]" "[superset of]" "⊃")
@@ -345,9 +377,12 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("sube" "\\subseteq" t "&sube;" "[subset of or equal to]" "[subset of or equal to]" "⊆")
     ("nsup" "\\not\\supset" t "&nsup;" "[not a superset of]" "[not a superset of]" "⊅")
     ("supe" "\\supseteq" t "&supe;" "[superset of or equal to]" "[superset of or equal to]" "⊇")
+    ("setminus" "\\setminus" t "&#x2216;" "\" "\" "⧵")
     ("forall" "\\forall" t "&forall;" "[for all]" "[for all]" "∀")
     ("exist" "\\exists" t "&exist;" "[there exists]" "[there exists]" "∃")
     ("exists" "\\exists" t "&exist;" "[there exists]" "[there exists]" "∃")
+    ("nexist" "\\exists" t "&exist;" "[there does not exists]" "[there does not  exists]" "∄")
+    ("nexists" "\\exists" t "&exist;" "[there does not exists]" "[there does not  exists]" "∄")
     ("empty" "\\empty" t "&empty;" "[empty set]" "[empty set]" "∅")
     ("emptyset" "\\emptyset" t "&empty;" "[empty set]" "[empty set]" "∅")
     ("isin" "\\in" t "&isin;" "[element of]" "[element of]" "∈")
@@ -374,6 +409,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("gets" "\\gets" t "&larr;"  "<-" "<-" "←")
     ("lArr" "\\Leftarrow" t "&lArr;" "<=" "<=" "⇐")
     ("Leftarrow" "\\Leftarrow" t "&lArr;" "<=" "<=" "⇐")
+    ("impliedby" "\\impliedby"  t "&lArr;" "<=" "<=" "⇐")
     ("uarr" "\\uparrow" t "&uarr;" "[uparrow]" "[uparrow]" "↑")
     ("uparrow" "\\uparrow" t "&uarr;" "[uparrow]" "[uparrow]" "↑")
     ("uArr" "\\Uparrow" t "&uArr;" "[dbluparrow]" "[dbluparrow]" "⇑")
@@ -383,6 +419,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("rightarrow" "\\rightarrow" t "&rarr;"  "->" "->" "→")
     ("rArr" "\\Rightarrow" t "&rArr;" "=>" "=>" "⇒")
     ("Rightarrow" "\\Rightarrow" t "&rArr;" "=>" "=>" "⇒")
+    ("implies" "\\implies" t "&rArr;" "=>" "=>" "⇒")
     ("darr" "\\downarrow" t "&darr;" "[downarrow]" "[downarrow]" "↓")
     ("downarrow" "\\downarrow" t "&darr;" "[downarrow]" "[downarrow]" "↓")
     ("dArr" "\\Downarrow" t "&dArr;" "[dbldownarrow]" "[dbldownarrow]" "⇓")
@@ -391,6 +428,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("leftrightarrow" "\\leftrightarrow" t "&harr;"  "<->" "<->" "↔")
     ("hArr" "\\Leftrightarrow" t "&hArr;" "<=>" "<=>" "⇔")
     ("Leftrightarrow" "\\Leftrightarrow" t "&hArr;" "<=>" "<=>" "⇔")
+    ("iff" "\\iff" t "&hArr;" "<=>" "<=>" "⇔")
     ("crarr" "\\hookleftarrow" t "&crarr;" "<-'" "<-'" "↵")
     ("hookleftarrow" "\\hookleftarrow" t "&crarr;"  "<-'" "<-'" "↵")
 
@@ -466,8 +504,9 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("heartsuit" "\\heartsuit" t "&heartsuit;" "[hearts]" "[hearts]" "♥")
     ("diams" "\\diamondsuit" t "&diams;" "[diamonds]" "[diamonds]" "♦")
     ("diamondsuit" "\\diamondsuit" t "&diams;" "[diamonds]" "[diamonds]" "♦")
+    ("diamond" "\\diamond" t "&diamond;" "[diamond]" "[diamond]" "⋄")
     ("Diamond" "\\diamond" t "&diamond;" "[diamond]" "[diamond]" "⋄")
-    ("loz" "\\diamond" t "&loz;" "[lozenge]" "[lozenge]" "◊")
+    ("loz" "\\lozenge" t "&loz;" "[lozenge]" "[lozenge]" "◊")
     )
   "Default entities used in Org-mode to produce special characters.
 For details see `org-entities-user'.")
-- 
1.8.3.4


[-- Attachment #3: Type: text/plain, Size: 26 bytes --]


--
Need more coffee. . .

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

* Re: [patch][org-entities] More symbols
  2013-08-18 15:56 [patch][org-entities] More symbols Rasmus
@ 2013-08-19  8:55 ` Nicolas Goaziou
  2013-08-28 11:38   ` Rasmus
  2013-08-31 16:02   ` Rasmus
  0 siblings, 2 replies; 12+ messages in thread
From: Nicolas Goaziou @ 2013-08-19  8:55 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Hello,

Rasmus <rasmus@gmx.us> writes:

Thanks for the patch.

> This patch adds some general interest(?) symbols to org entities that
> otherwise lived in my init file.
>
> 1. I don't know how to easily check whether a glyph is supported by
>    Latin 1, so Latin 1 entries correspond to the ASCII equivalent.

Use "C-u C-x =" on the character and look at "preferred charset"
property.

> 2. HTML symbols have been tested in Firefox.  In a few cases I
>    couldn't find a pretty name (like "&pi;") in which case I've
>    supplied the unicode number (like "&960;").  Is that OK?  (E.g. can
>    Org produce non-uft8 HTML?)

I think it can: see `org-html-coding-system'. It may be wiser to avoid
these symbols altogether.

> 3. In LaTeX the symbols are mostly defined in amsmath, except coloneqq
>    and eqqcolon which requires something like mathtools or kpfonts or
>    possibly unicode-math.  Is that OK?

Any additional package needed must be added to
`org-latex-default-packages-alist', which means that the package will be
loaded in every LaTeX export. So, this is clearly not OK for packages
like "kpfonts".

As a rule of thumb, I think we should avoid requiring new packages for
org-entities.

> I also fixed some
>    inconsistencies.  E.g. loz was loaded diamond even though loz is
>    defined in amssymb and "~" and "\tilde" produced different results
>    (the latter produces the irritating "\~{}" often observed among
>    (social science?) university professors...).

Sounds good.

> +    ("varphi", "\\varphi" t "&varphi;" "varphi" "varphi" "ɸ ")

Why is there a space in UTF-8 code?

> +    ("preccurlyeq" "\\preccurlyeq" t "&prcue;" "[precedes or equal]" "[precedes or equal]" "≼")

This one is LaTeX specific, it may be more appropriate in
`org-entities-user'.

> +    ("succcurlyeq" "\\succeq" t "&sccue;" "[succeeds or equal]" "[succeeds or equal]" "≽")

Ditto. Also, the LaTeX code looks wrong.

> +    ("nexist" "\\exists" t "&exist;" "[there does not exists]" "[there does not  exists]" "∄")
> +    ("nexists" "\\exists" t "&exist;" "[there does not exists]" "[there does not  exists]" "∄")

Didn't you forget a "\not" in LaTeX entry?

>      ("lArr" "\\Leftarrow" t "&lArr;" "<=" "<=" "⇐")
>      ("Leftarrow" "\\Leftarrow" t "&lArr;" "<=" "<=" "⇐")
> +    ("impliedby" "\\impliedby"  t "&lArr;" "<=" "<=" "⇐")

Is is really needed? There are already two entities producing the same
code.

>      ("rArr" "\\Rightarrow" t "&rArr;" "=>" "=>" "⇒")
>      ("Rightarrow" "\\Rightarrow" t "&rArr;" "=>" "=>" "⇒")
> +    ("implies" "\\implies" t "&rArr;" "=>" "=>" "⇒")

Ditto.

>      ("Leftrightarrow" "\\Leftrightarrow" t "&hArr;" "<=>" "<=>" "⇔")
> +    ("iff" "\\iff" t "&hArr;" "<=>" "<=>" "⇔")

Ditto.


Regards,

-- 
Nicolas Goaziou

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

* Re: [patch][org-entities] More symbols
  2013-08-19  8:55 ` Nicolas Goaziou
@ 2013-08-28 11:38   ` Rasmus
  2013-09-01 12:57     ` Jambunathan K
  2013-08-31 16:02   ` Rasmus
  1 sibling, 1 reply; 12+ messages in thread
From: Rasmus @ 2013-08-28 11:38 UTC (permalink / raw)
  To: n.goaziou; +Cc: emacs-orgmode


Hi Nicolsa,

Sorry about the late reply.

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Thanks for the patch.
>
>> This patch adds some general interest(?) symbols to org entities that
>> otherwise lived in my init file.
>>
>> 1. I don't know how to easily check whether a glyph is supported by
>>    Latin 1, so Latin 1 entries correspond to the ASCII equivalent.
>
> Use "C-u C-x =" on the character and look at "preferred charset"
> property.

OK.

>> 2. HTML symbols have been tested in Firefox.  In a few cases I
>>    couldn't find a pretty name (like "&pi;") in which case I've
>>    supplied the unicode number (like "&960;").  Is that OK?  (E.g. can
>>    Org produce non-uft8 HTML?)
>
> I think it can: see `org-html-coding-system'. It may be wiser to avoid
> these symbols altogether.

OK.

>> 3. In LaTeX the symbols are mostly defined in amsmath, except coloneqq
>>    and eqqcolon which requires something like mathtools or kpfonts or
>>    possibly unicode-math.  Is that OK?
>
> Any additional package needed must be added to
> `org-latex-default-packages-alist', which means that the package will be
> loaded in every LaTeX export. So, this is clearly not OK for packages
> like "kpfonts".

OK.

> As a rule of thumb, I think we should avoid requiring new packages for
> org-entities.

I agree.  I'd wish we could cut down on some of these darn symbol
packages!  latexsymb should be fairly easy to get rid of.

>> I also fixed some
>>    inconsistencies.  E.g. loz was loaded diamond even though loz is
>>    defined in amssymb and "~" and "\tilde" produced different results
>>    (the latter produces the irritating "\~{}" often observed among
>>    (social science?) university professors...).
>
> Sounds good.
>
>> +    ("varphi", "\\varphi" t "&varphi;" "varphi" "varphi" "ɸ ")
>
> Why is there a space in UTF-8 code?

Bug.

>> + ("preccurlyeq" "\\preccurlyeq" t "&prcue;" "[precedes or equal]"
>> "[precedes or equal]" "≼")
>
> This one is LaTeX specific, it may be more appropriate in
> `org-entities-user'.

We also have stuff like le and rarr, which is clearly HTML-specific.
An important part of entities (IMO) is the unicode display in-buffer.

>> + ("succcurlyeq" "\\succeq" t "&sccue;" "[succeeds or equal]"
>> "[succeeds or equal]" "≽")
>
> Ditto. Also, the LaTeX code looks wrong.

True. 

>> + ("nexist" "\\exists" t "&exist;" "[there does not exists]" "[there
>> does not exists]" "∄")
>> + ("nexists" "\\exists" t "&exist;" "[there does not exists]"
>> "[there does not exists]" "∄")
>
> Didn't you forget a "\not" in LaTeX entry?

Yup.  This is getting embarrassing.

>>      ("lArr" "\\Leftarrow" t "&lArr;" "<=" "<=" "⇐")
>>      ("Leftarrow" "\\Leftarrow" t "&lArr;" "<=" "<=" "⇐")
>> +    ("impliedby" "\\impliedby"  t "&lArr;" "<=" "<=" "⇐")
>
> Is is really needed? There are already two entities producing the same
> code.

impliedby, iff and implied are recommended since they use correct
spacing.  They are, however, defined in amsmath, which isn't loaded,
although perhaps it should be.

I'll prepare a reduced patch.

–Rasmus

-- 
Don't panic!!!

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

* Re: [patch][org-entities] More symbols
  2013-08-19  8:55 ` Nicolas Goaziou
  2013-08-28 11:38   ` Rasmus
@ 2013-08-31 16:02   ` Rasmus
  2013-08-31 16:19     ` [patch] Remove dependency on latexsym (was: [patch][org-entities] More symbols) Rasmus
  2013-09-01 12:33     ` [patch][org-entities] More symbols Nicolas Goaziou
  1 sibling, 2 replies; 12+ messages in thread
From: Rasmus @ 2013-08-31 16:02 UTC (permalink / raw)
  To: n.goaziou; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]

Nicolas Goaziou <n.goaziou@gmail.com> writes:

>> 2. HTML symbols have been tested in Firefox.  In a few cases I
>>    couldn't find a pretty name (like "&pi;") in which case I've
>>    supplied the unicode number (like "&960;").  Is that OK?  (E.g. can
>>    Org produce non-uft8 HTML?)
>
> I think it can: see `org-html-coding-system'. It may be wiser to avoid
> these symbols altogether.

OK.  The only ones remaining are 

    ("smiley" "\\smiley{}" nil "&#9786;" ":-)" ":-)" "☺")
    ("blacksmile" "\\blacksmiley{}" nil "&#9787;" ":-)" ":-)" "☻")
    ("sad" "\\frownie{}" nil "&#9785;" ":-(" ":-(" "☹")


> Any additional package needed must be added to
> `org-latex-default-packages-alist', which means that the package will be
> loaded in every LaTeX export. So, this is clearly not OK for packages
> like "kpfonts".

OK, they should all work.

>> I also fixed some
>>    inconsistencies.  E.g. loz was loaded diamond even though loz is
>>    defined in amssymb and "~" and "\tilde" produced different results
>>    (the latter produces the irritating "\~{}" often observed among
>>    (social science?) university professors...).
>
> Sounds good.

>> + ("preccurlyeq" "\\preccurlyeq" t "&prcue;" "[precedes or equal]"
>> "[precedes or equal]" "≼")
>
> This one is LaTeX specific, it may be more appropriate in
> `org-entities-user'.

There are many X-specific entities. . .  E.g. lArr is html specific.
One important feature of entities is that unicode symbols can be
displayed in buffer.  If you feel strongly about it, I can remove
them.

–Rasmus


[-- Attachment #2: 0001-More-org-entities.patch --]
[-- Type: text/x-diff, Size: 11549 bytes --]

From 17c722aab3e94db069884cb8dba1103ff7b6c9a9 Mon Sep 17 00:00:00 2001
From: rasmus <rasmus@gmx.us>
Date: Sun, 18 Aug 2013 17:42:33 +0200
Subject: [PATCH] More org-entities.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* org-entities.el (org-entities): Add support for ell, imath, jmath,
varphi, varpi, aleph, gimel, beth, dalet, cdots, S (§), dag, ddag,
colon, therefore, because, triangleq, leq, geq, lessgtr, lesseqgtr,
ll, lll, gg, ggg, prec, preceq, preccurleyeq, succ, succeq,
succurleyeq, setminus, nexist(s), mho, check, frown, diamond.  Changes loz,
vert, checkmark, smile and tilde.
---
 lisp/org-entities.el | 59 ++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 50 insertions(+), 9 deletions(-)

diff --git a/lisp/org-entities.el b/lisp/org-entities.el
index a1519b0..638da78 100644
--- a/lisp/org-entities.el
+++ b/lisp/org-entities.el
@@ -154,6 +154,9 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("real" "\\Re" t "&real;" "R" "R" "ℜ")
     ("image" "\\Im" t "&image;" "I" "I" "ℑ")
     ("weierp" "\\wp" t "&weierp;" "P" "P" "℘")
+    ("ell" "\\ell" t "&ell;" "ell" "ell" "ℓ")
+    ("imath" "\\imath" t "&imath;" "[dotless i]" "dotless i" "ı")
+    ("jmath" "\\jmath" t "&jmath;" "[dotless j]" "dotless j" "ȷ")
 
     "** Greek"
     ("Alpha" "A" nil "&Alpha;" "Alpha" "Alpha" "Α")
@@ -203,6 +206,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("upsilon" "\\upsilon" t "&upsilon;" "upsilon" "upsilon" "υ")
     ("Phi" "\\Phi" t "&Phi;" "Phi" "Phi" "Φ")
     ("phi" "\\phi" t "&phi;" "phi" "phi" "φ")
+    ("varphi" "\\varphi" t "&varphi;" "varphi" "varphi" "ɸ")
     ("Chi" "X" nil "&Chi;" "Chi" "Chi" "Χ")
     ("chi" "\\chi" t "&chi;" "chi" "chi" "χ")
     ("acutex" "\\acute x" t "&acute;x" "'x" "'x" "𝑥́")
@@ -212,10 +216,15 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("Omega" "\\Omega" t "&Omega;" "Omega" "Omega" "Ω")
     ("omega" "\\omega" t "&omega;" "omega" "omega" "ω")
     ("piv" "\\varpi" t "&piv;" "omega-pi" "omega-pi" "ϖ")
+    ("varpi" "\\varpi" t "&piv;" "omega-pi" "omega-pi" "ϖ")
     ("partial" "\\partial" t "&part;" "[partial differential]" "[partial differential]" "∂")
 
     "** Hebrew"
     ("alefsym" "\\aleph" t "&alefsym;" "aleph" "aleph" "ℵ")
+    ("aleph" "\\aleph" t "&aleph;" "aleph" "aleph" "ℵ")
+    ("gimel" "\\gimel" t "&gimel;" "gimel" "gimel" "ℷ")
+    ("beth" "\\beth" t "&beth;" "beth" "beth" "ב")
+    ("dalet" "\\daleth" t "&daleth;" "dalet" "dalet" "ד")
 
     "** Dead languages"
     ("ETH" "\\DH{}" nil "&ETH;" "D" "Ð" "Ð")
@@ -226,6 +235,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     "* Punctuation"
     "** Dots and Marks"
     ("dots" "\\dots{}" nil "&hellip;" "..." "..." "…")
+    ("cdots" "\\cdots{}" t "&ctdot;" "..." "..." "⋯")
     ("hellip" "\\dots{}" nil "&hellip;" "..." "..." "…")
     ("middot" "\\textperiodcentered{}" nil "&middot;" "." "·" "·")
     ("iexcl" "!`" nil "&iexcl;" "!" "¡" "¡")
@@ -253,20 +263,23 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     "* Other"
     "** Misc. (often used)"
     ("circ" "\\^{}" nil "&circ;" "^" "^" "ˆ")
-    ("vert" "\\vert{}" t "&#124;" "|" "|" "|")
+    ("vert" "\\vert{}" t "&vert;" "|" "|" "|")
     ("brvbar" "\\textbrokenbar{}" nil "&brvbar;" "|" "¦" "¦")
+    ("S" "\\S" nil "&sect;" "paragraph" "§" "§")
     ("sect" "\\S" nil "&sect;" "paragraph" "§" "§")
     ("amp" "\\&" nil "&amp;" "&" "&" "&")
     ("lt" "\\textless{}" nil "&lt;" "<" "<" "<")
     ("gt" "\\textgreater{}" nil "&gt;" ">" ">" ">")
-    ("tilde" "\\~{}" nil "&tilde;" "~" "~" "~")
+    ("tilde" "\\textasciitilde{}" nil "~" "~" "~" "~")
     ("slash" "/" nil "/" "/" "/" "/")
     ("plus" "+" nil "+" "+" "+" "+")
     ("under" "\\_" nil "_" "_" "_" "_")
     ("equal" "=" nil "=" "=" "=" "=")
     ("asciicirc" "\\textasciicircum{}" nil "^" "^" "^" "^")
     ("dagger" "\\textdagger{}" nil "&dagger;" "[dagger]" "[dagger]" "†")
+    ("dag" "\\dag{}" nil "&dagger;" "[dagger]" "[dagger]" "†")
     ("Dagger" "\\textdaggerdbl{}" nil "&Dagger;" "[doubledagger]" "[doubledagger]" "‡")
+    ("ddag" "\\ddag{}" nil "&Dagger;" "[doubledagger]" "[doubledagger]" "‡")
 
     "** Whitespace"
     ("nbsp" "~" nil "&nbsp;" " " " " " ")
@@ -297,6 +310,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("plusmn" "\\textpm{}" nil "&plusmn;" "+-" "±" "±")
     ("times" "\\texttimes{}" nil "&times;" "*" "×" "×")
     ("frasl" "/" nil "&frasl;" "/" "/" "⁄")
+    ("colon" "\\colon" t ":" ":" ":" ":")
     ("div" "\\textdiv{}" nil "&divide;" "/" "÷" "÷")
     ("frac12" "\\textonehalf{}" nil "&frac12;" "1/2" "½" "½")
     ("frac14" "\\textonequarter{}" nil "&frac14;" "1/4" "¼" "¼")
@@ -326,7 +340,9 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("cap" "\\cap" t "&cap;" "[intersection]" "[intersection]" "∩")
     ("cup" "\\cup" t "&cup;" "[union]" "[union]" "∪")
     ("int" "\\int" t "&int;" "[integral]" "[integral]" "∫")
+    ("therefore" "\\therefore" t "&there4;" "[therefore]" "[therefore]" "∴")
     ("there4" "\\therefore" t "&there4;" "[therefore]" "[therefore]" "∴")
+    ("because" "\\because" t "&because;" "[because]" "[because]" "∵")
     ("sim" "\\sim" t "&sim;" "~" "~" "∼")
     ("cong" "\\cong" t "&cong;" "[approx. equal to]" "[approx. equal to]" "≅")
     ("simeq" "\\simeq" t "&cong;"  "[approx. equal to]" "[approx. equal to]" "≅")
@@ -335,8 +351,26 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("ne" "\\ne" t "&ne;" "[not equal to]" "[not equal to]" "≠")
     ("neq" "\\neq" t "&ne;" "[not equal to]" "[not equal to]" "≠")
     ("equiv" "\\equiv" t "&equiv;" "[identical to]" "[identical to]" "≡")
+
+    ("triangleq" "\\triangleq" t "&triangleq;" "[defined to]" "[defined to]" "≜")
     ("le" "\\le" t "&le;" "<=" "<=" "≤")
+    ("leq" "\\le" t "&le;" "<=" "<=" "≤")
     ("ge" "\\ge" t "&ge;" ">=" ">=" "≥")
+    ("geq" "\\ge" t "&ge;" ">=" ">=" "≥")
+    ("lessgtr" "\\lessgtr" t "&lessgtr;" "[less than or greater than]" "[less than or greater than]" "≶")
+    ("lesseqgtr" "\\lesseqgtr" t "&lesseqgtr;" "[less than or equal or greater than or equal]" "[less than or equal or greater than or equal]" "⋚")
+    ("ll" "\\ll" t  "&Lt;" "<<" "<<" "≪")
+    ("Ll" "\lll" t "&Ll;" "<<<" "<<<" "⋘")
+    ("lll" "\lll" t "&Ll;" "<<<" "<<<" "⋘")
+    ("gg" "\\gg" t  "&Gt;" ">>" ">>" "≫")
+    ("Gg" "\\ggg" t "&Gg;" ">>>" ">>>" "⋙")
+    ("ggg" "\\ggg" t "&Gg;" ">>>" ">>>" "⋙")
+    ("prec" "\\prec" t "&pr;" "[precedes]" "[precedes]" "≺")
+    ("preceq" "\\preceq" t "&prcue;" "[precedes or equal]" "[precedes or equal]" "≼")
+    ("preccurlyeq" "\\preccurlyeq" t "&prcue;" "[precedes or equal]" "[precedes or equal]" "≼")
+    ("succ" "\\succ" t "&sc;" "[succeeds]" "[succeeds]" "≻")
+    ("succeq" "\\succeq" t "&sccue;" "[succeeds or equal]" "[succeeds or equal]" "≽")
+    ("succcurlyeq" "\\succcurlyeq" t "&sccue;" "[succeeds or equal]" "[succeeds or equal]" "≽")
     ("sub" "\\subset" t "&sub;" "[subset of]" "[subset of]" "⊂")
     ("subset" "\\subset" t "&sub;" "[subset of]" "[subset of]" "⊂")
     ("sup" "\\supset" t "&sup;" "[superset of]" "[superset of]" "⊃")
@@ -345,9 +379,12 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("sube" "\\subseteq" t "&sube;" "[subset of or equal to]" "[subset of or equal to]" "⊆")
     ("nsup" "\\not\\supset" t "&nsup;" "[not a superset of]" "[not a superset of]" "⊅")
     ("supe" "\\supseteq" t "&supe;" "[superset of or equal to]" "[superset of or equal to]" "⊇")
+    ("setminus" "\\setminus" t "&setminus;" "\" "\" "⧵")
     ("forall" "\\forall" t "&forall;" "[for all]" "[for all]" "∀")
     ("exist" "\\exists" t "&exist;" "[there exists]" "[there exists]" "∃")
     ("exists" "\\exists" t "&exist;" "[there exists]" "[there exists]" "∃")
+    ("nexist" "\\nexists" t "&exist;" "[there does not exists]" "[there does not  exists]" "∄")
+    ("nexists" "\\nexists" t "&exist;" "[there does not exists]" "[there does not  exists]" "∄")
     ("empty" "\\empty" t "&empty;" "[empty set]" "[empty set]" "∅")
     ("emptyset" "\\emptyset" t "&empty;" "[empty set]" "[empty set]" "∅")
     ("isin" "\\in" t "&isin;" "[element of]" "[element of]" "∈")
@@ -366,7 +403,8 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("rfloor" "\\rfloor" t "&rfloor;" "[right floor]" "[right floor]" "⌋")
     ("lang" "\\langle" t "&lang;" "<" "<" "⟨")
     ("rang" "\\rangle" t "&rang;" ">" ">" "⟩")
-    ("hbar" "\\hbar" t "&#8463;" "hbar" "hbar" "ℏ")
+    ("hbar" "\\hbar" t "&hbar;" "hbar" "hbar" "ℏ")
+    ("mho" "\\mho" t "&mho;" "mho" "mho" "℧")
 
     "** Arrows"
     ("larr" "\\leftarrow" t "&larr;" "<-" "<-" "←")
@@ -437,7 +475,8 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("odot" "\\odot" t "o" "[circled dot]" "[circled dot]" "ʘ")
     ("oplus" "\\oplus" t "&oplus;" "[circled plus]" "[circled plus]" "⊕")
     ("otimes" "\\otimes" t "&otimes;" "[circled times]" "[circled times]" "⊗")
-    ("checkmark" "\\checkmark" t "&#10003;" "[checkmark]" "[checkmark]" "✓")
+    ("check" "\\checkmark" t "&checkmark;" "[checkmark]" "[checkmark]" "✓")
+    ("checkmark" "\\checkmark" t "&check;" "[checkmark]" "[checkmark]" "✓")
 
     "** Miscellaneous (seldom used)"
     ("para" "\\P{}" nil "&para;" "[pilcrow]" "¶" "¶")
@@ -452,7 +491,8 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("rlm" "" nil "&rlm;" "" "" "‏")
 
     "** Smilies"
-    ("smile" "\\smile" t "&#9786;" ":-)" ":-)" "⌣")
+    ("smile" "\\smile" t "&smile;" ":-)" ":-)" "⌣")
+    ("frown" "\\frown" t "&frown;" ":-(" ":-(" "⌢")
     ("smiley" "\\smiley{}" nil "&#9786;" ":-)" ":-)" "☺")
     ("blacksmile" "\\blacksmiley{}" nil "&#9787;" ":-)" ":-)" "☻")
     ("sad" "\\frownie{}" nil "&#9785;" ":-(" ":-(" "☹")
@@ -464,10 +504,11 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
     ("spadesuit" "\\spadesuit" t "&spades;" "[spades]" "[spades]" "♠")
     ("hearts" "\\heartsuit" t "&hearts;" "[hearts]" "[hearts]" "♥")
     ("heartsuit" "\\heartsuit" t "&heartsuit;" "[hearts]" "[hearts]" "♥")
-    ("diams" "\\diamondsuit" t "&diams;" "[diamonds]" "[diamonds]" "♦")
-    ("diamondsuit" "\\diamondsuit" t "&diams;" "[diamonds]" "[diamonds]" "♦")
-    ("Diamond" "\\diamond" t "&diamond;" "[diamond]" "[diamond]" "⋄")
-    ("loz" "\\diamond" t "&loz;" "[lozenge]" "[lozenge]" "◊")
+    ("diams" "\\diamondsuit" t "&diams;" "[diamonds]" "[diamonds]" "◆")
+    ("diamondsuit" "\\diamondsuit" t "&diams;" "[diamonds]" "[diamonds]" "◆")
+    ("diamond" "\\diamondsuit" t "&diamond;" "[diamond]" "[diamond]" "◆")
+    ("Diamond" "\\diamondsuit" t "&diamond;" "[diamond]" "[diamond]" "◆")
+    ("loz" "\\lozenge" t "&loz;" "[lozenge]" "[lozenge]" "⧫")
     )
   "Default entities used in Org-mode to produce special characters.
 For details see `org-entities-user'.")
-- 
1.8.4


[-- Attachment #3: Type: text/plain, Size: 24 bytes --]


-- 
Send from my Emacs

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

* [patch] Remove dependency on latexsym (was: [patch][org-entities] More symbols)
  2013-08-31 16:02   ` Rasmus
@ 2013-08-31 16:19     ` Rasmus
  2013-09-01 12:34       ` [patch] Remove dependency on latexsym Nicolas Goaziou
  2013-09-01 12:33     ` [patch][org-entities] More symbols Nicolas Goaziou
  1 sibling, 1 reply; 12+ messages in thread
From: Rasmus @ 2013-08-31 16:19 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 633 bytes --]


Hi,

> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
> As a rule of thumb, I think we should avoid requiring new packages for
> org-entities.

It's easy to remove the decency of latexsym as it only defines a very
limited number of symbols (see texdoc latexsym).  Using amssymb
symbols will even look better IMO, but check this document:

#+BEGIN_SRC Org
#+latex:\Huge
  - [ ] x
  - [-] x
  - [X] x
#+begin_latex
  \begin{itemize}
  \item $\square$ x
  \item $\boxminus$ x
  \item $\boxtimes$ x
  \end{itemize}
#+end_latex
#+END_SRC

Obviously, it requires the removal of Diamond (my entity patch) and
Box (this patch)

–Rasmus


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-Remove-dependency-on-latexsym.patch --]
[-- Type: text/x-diff, Size: 1957 bytes --]

From 613f28f3bc5d2a6e35093b0a6f33d9b6ec393458 Mon Sep 17 00:00:00 2001
From: rasmus <rasmus@gmx.us>
Date: Sat, 31 Aug 2013 18:15:12 +0200
Subject: [PATCH 2/2] Remove dependency on latexsym.

* ox-latex.el (org-latex-item): Use square as unchecked symbol.
* org.el (org-latex-default-packages-alist): Remove latexsym.

Use amssymb symbols to reduce required packages.
---
 lisp/org.el      | 5 ++---
 lisp/ox-latex.el | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 572b797..90fdfee 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3832,7 +3832,6 @@ header, or they will be appended."
     (""     "textcomp"  t)
     (""     "marvosym"  t)
     (""     "wasysym"   t)
-    (""     "latexsym"  t)
     (""     "amssymb"   t)
     (""     "amstext"   nil)
     (""     "hyperref"  nil)
@@ -3847,7 +3846,7 @@ Org mode to function properly:
 
 - inputenc, fontenc:  for basic font and character selection
 - amstext: for subscript and superscript
-- textcomp, marvosymb, wasysym, latexsym, amssym: for various
+- textcomp, marvosymb, wasysym, amssymb: for various
   symbols used for interpreting the entities in `org-entities'.
   You can skip some of these packages if you don't use any of the
   symbols in it.
@@ -7653,7 +7652,7 @@ This is important for non-interactive uses of the command."
 	   (t
 	    (goto-char (point-at-eol))
 	    (insert "\n")))
-	  
+
 	  ;; Insert the new heading
 	  (insert stars)
 	  (just-one-space)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 1fe918a..e1173ef 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1561,7 +1561,7 @@ contextual information."
 			 (1- count)))))
 	 (checkbox (case (org-element-property :checkbox item)
 		     (on "$\\boxtimes$ ")
-		     (off "$\\Box$ ")
+		     (off "$\\square$ ")
 		     (trans "$\\boxminus$ ")))
 	 (tag (let ((tag (org-element-property :tag item)))
 		;; Check-boxes must belong to the tag.
-- 
1.8.4


[-- Attachment #3: Type: text/plain, Size: 72 bytes --]



-- 
If you can mix business and politics wonderful things can happen!

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

* Re: [patch][org-entities] More symbols
  2013-08-31 16:02   ` Rasmus
  2013-08-31 16:19     ` [patch] Remove dependency on latexsym (was: [patch][org-entities] More symbols) Rasmus
@ 2013-09-01 12:33     ` Nicolas Goaziou
  2013-09-02 11:31       ` Rasmus
  1 sibling, 1 reply; 12+ messages in thread
From: Nicolas Goaziou @ 2013-09-01 12:33 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Hello,

Rasmus <rasmus@gmx.us> writes:

> Subject: [PATCH] More org-entities.

Stylistic note for future patches: there should be no period at the end
of the title.

> * org-entities.el (org-entities): Add support for ell, imath, jmath,
> varphi, varpi, aleph, gimel, beth, dalet, cdots, S (§), dag, ddag,
> colon, therefore, because, triangleq, leq, geq, lessgtr, lesseqgtr,
> ll, lll, gg, ggg, prec, preceq, preccurleyeq, succ, succeq,
> succurleyeq, setminus, nexist(s), mho, check, frown, diamond.  Changes loz,
> vert, checkmark, smile and tilde.

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou

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

* Re: [patch] Remove dependency on latexsym
  2013-08-31 16:19     ` [patch] Remove dependency on latexsym (was: [patch][org-entities] More symbols) Rasmus
@ 2013-09-01 12:34       ` Nicolas Goaziou
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Goaziou @ 2013-09-01 12:34 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Hello,

Rasmus <rasmus@gmx.us> writes:

> It's easy to remove the decency of latexsym as it only defines a very
> limited number of symbols (see texdoc latexsym).  Using amssymb
> symbols will even look better IMO, but check this document:

[...]


> Obviously, it requires the removal of Diamond (my entity patch) and
> Box (this patch)

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou

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

* Re: [patch][org-entities] More symbols
  2013-08-28 11:38   ` Rasmus
@ 2013-09-01 12:57     ` Jambunathan K
  2013-09-02 11:30       ` Rasmus
  0 siblings, 1 reply; 12+ messages in thread
From: Jambunathan K @ 2013-09-01 12:57 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode, n.goaziou


Rasmus

It seems you have a keen interest in latex + org-entities.

(This might be familiar to you.)  

You can do a,

    C-x b *scarath*
    C-x C-m C-\ TeX
    C-h C-\ RET

and pull all the entities that you ever want in a single go (rather than
including them piecemeal-by-piecemeal.)

With some scripting, this pulling can be made less laborious but more
complete.

This is just a note.  Nothing beyond that.

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

* Re: [patch][org-entities] More symbols
  2013-09-01 12:57     ` Jambunathan K
@ 2013-09-02 11:30       ` Rasmus
  2013-09-02 12:47         ` Jambunathan K
  0 siblings, 1 reply; 12+ messages in thread
From: Rasmus @ 2013-09-02 11:30 UTC (permalink / raw)
  To: kjambunathan; +Cc: emacs-orgmode

Jambunathan,

> You can do a,
>
>     C-x b *scarath*
>     C-x C-m C-\ TeX
>     C-h C-\ RET
>
> and pull all the entities that you ever want in a single go (rather than
> including them piecemeal-by-piecemeal.)

Indeed, I use this in message buffers.  If using unicode-math (a GREAT
latex package) one should even be able to use TeX input style in an
Org buffer.  However, cdlatex + entities is much quicker (on my system
"¨ b" (I've changed default keys) for β versus "\beta").

> With some scripting, this pulling can be made less laborious but more
> complete.

Would you be able to get the HTML entities?  Nicolas said that Org
"prefers" entity names due to encoding.  I can find the unicode number
in Emacs, but not it's name.  This is often the laborious part.

> This is just a note.  Nothing beyond that.

Thanks.

–Rasmus

-- 
You people at the NSA are becoming my new best friends!

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

* Re: [patch][org-entities] More symbols
  2013-09-01 12:33     ` [patch][org-entities] More symbols Nicolas Goaziou
@ 2013-09-02 11:31       ` Rasmus
  0 siblings, 0 replies; 12+ messages in thread
From: Rasmus @ 2013-09-02 11:31 UTC (permalink / raw)
  To: n.goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> Rasmus <rasmus@gmx.us> writes:
>
>> Subject: [PATCH] More org-entities.
>
> Stylistic note for future patches: there should be no period at the end
> of the title.

OK, sorry.  Next time just let me know and I'll resubmit the patch.

–Rasmus

-- 
May contains speling mistake

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

* Re: [patch][org-entities] More symbols
  2013-09-02 11:30       ` Rasmus
@ 2013-09-02 12:47         ` Jambunathan K
  2013-09-02 13:48           ` Rasmus
  0 siblings, 1 reply; 12+ messages in thread
From: Jambunathan K @ 2013-09-02 12:47 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

>> With some scripting, this pulling can be made less laborious but more
>> complete.
>
> Would you be able to get the HTML entities?  Nicolas said that Org
> "prefers" entity names due to encoding.  I can find the unicode number
> in Emacs, but not it's name.  This is often the laborious part.

Why use name when it is easier to use the numerical value?  

Something like &#x2014; should be good for —.  (You can get the code
value by doing the C-u C-x = on the displayed character.)

,----
|       character: — (displayed as —) (codepoint 8212, #o20024, #x2014)
|                                                               ^^^^^^
|   name: EM DASH
`----

----------------------------------------------------------------

I see that the entity names are listed in
http://www.w3.org/TR/xml-entity-names/byalpha.html

----------------------------------------------------------------

Load the above file within Emacs.

  M-x eww http://www.w3.org/TR/xml-entity-names/byalpha.html RET

or 

  M-x browse-url-emacs RET
  http://www.w3.org/TR/xml-entity-names/byalpha.html RET
  
  M-x load-library RET shr RET 
  M-x shr-render-buffer RET

Write the resulting buffer to an Org buffer or a text file. Then C-s for
the unicode codepoint, C-a to get the entity name.  You are done.

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

* Re: [patch][org-entities] More symbols
  2013-09-02 12:47         ` Jambunathan K
@ 2013-09-02 13:48           ` Rasmus
  0 siblings, 0 replies; 12+ messages in thread
From: Rasmus @ 2013-09-02 13:48 UTC (permalink / raw)
  To: kjambunathan; +Cc: emacs-orgmode

Jambunathan K <kjambunathan@gmail.com> writes:

> Rasmus <rasmus@gmx.us> writes:
>
>>> With some scripting, this pulling can be made less laborious but more
>>> complete.
>>
>> Would you be able to get the HTML entities?  Nicolas said that Org
>> "prefers" entity names due to encoding.  I can find the unicode number
>> in Emacs, but not it's name.  This is often the laborious part.
>
> Why use name when it is easier to use the numerical value?  

Don't know.  Here's a quote from earlier.  I personally didn't look
further into it.

>> I wrote:
>> 2. HTML symbols have been tested in Firefox.  In a few cases I
>>    couldn't find a pretty name (like "&pi;") in which case I've
>>    supplied the unicode number (like "&960;").  Is that OK?  (E.g. can
>>    Org produce non-uft8 HTML?)

> Nicolas wrote:
> I think it can: see `org-html-coding-system'. It may be wiser to avoid
> these symbols altogether.



> Something like &#x2014; should be good for —.  (You can get the code
> value by doing the C-u C-x = on the displayed character.)

Irrespective of encoding?

> ,----
> |       character: — (displayed as —) (codepoint 8212, #o20024, #x2014)
> |                                                               ^^^^^^
> |   name: EM DASH
> `----
>
> ----------------------------------------------------------------
>
> I see that the entity names are listed in
> http://www.w3.org/TR/xml-entity-names/byalpha.html

Right.

Are we having (huge) gaps somewhere worth fixing?

–Rasmus

-- 
This space is left intentionally blank

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

end of thread, other threads:[~2013-09-02 13:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-18 15:56 [patch][org-entities] More symbols Rasmus
2013-08-19  8:55 ` Nicolas Goaziou
2013-08-28 11:38   ` Rasmus
2013-09-01 12:57     ` Jambunathan K
2013-09-02 11:30       ` Rasmus
2013-09-02 12:47         ` Jambunathan K
2013-09-02 13:48           ` Rasmus
2013-08-31 16:02   ` Rasmus
2013-08-31 16:19     ` [patch] Remove dependency on latexsym (was: [patch][org-entities] More symbols) Rasmus
2013-09-01 12:34       ` [patch] Remove dependency on latexsym Nicolas Goaziou
2013-09-01 12:33     ` [patch][org-entities] More symbols Nicolas Goaziou
2013-09-02 11:31       ` Rasmus

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