[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Org-entities-user in caption of Latex export
From: |
Nick Dokos |
Subject: |
Re: [O] Org-entities-user in caption of Latex export |
Date: |
Thu, 24 Jul 2014 11:57:59 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
address@hidden (Thomas S. Dye) writes:
> Nicolas Goaziou <address@hidden> writes:
>
>> I cannot reproduce it. Do you have an ECM? Are you setting
>> `org-entities-user' in a special way (i.e, not globally through `setq'
>> or customize)?
>
> In the process of putting together an ECM (which hopefully doesn't
> reflect my setup!), I think I found what triggers it.
>
> I'm setting variables buffer local as a way to make reproducible
> research documents self-contained. The line that sets org-entities-user
> nil is the culprit. Without it, I get the output I expect. With it, I
> get the behavior I described.
>
> Here is my try at an ECM:
>
> #+STARTUP: entitiespretty
>
> \amacron \ocirc
>
> #+caption: \amacron \ocirc
> | a | b |
> | c | d |
>
> ** User Entities :noexport:
> The following source code block sets up user entities that are used frequently
> in my work. I use the various =.*macron= commands to typeset Hawaiian
> language words with what is known in Hawaiian as a /kahak\omacron{}/.
>
> #+name: user-entities-local
> #+begin_src emacs-lisp
> (add-to-list 'org-entities-user '("amacron" "\\={a}" nil "ā" "a" "a"
> "ā"))
> (add-to-list 'org-entities-user '("emacron" "\\={e}" nil "ē" "e" "e"
> "ē"))
> (add-to-list 'org-entities-user '("imacron" "\\={\\i}" nil "ī" "i" "i"
> "ī"))
> (add-to-list 'org-entities-user '("omacron" "\\={o}" nil "ō" "o" "o"
> "ō"))
> (add-to-list 'org-entities-user '("umacron" "\\={u}" nil "ū" "u" "u"
> "ū"))
> (add-to-list 'org-entities-user '("Amacron" "\\={A}" nil "Ā" "A" "A"
> "Ā"))
> (add-to-list 'org-entities-user '("Emacron" "\\={E}" nil "Ē" "E" "E"
> "Ē"))
> (add-to-list 'org-entities-user '("Imacron" "\\={I}" nil "Ī" "I" "I"
> "Ī"))
> (add-to-list 'org-entities-user '("Omacron" "\\={O}" nil "Ō" "O" "O"
> "Ō"))
> (add-to-list 'org-entities-user '("Umacron" "\\={U}" nil "Ū" "U" "U"
> "Ū"))
> #+end_src
>
>
> ** Local variables :noexport:
>
> # Local Variables:
> # eval: (require 'ox-latex)
> # eval: (and (fboundp 'org-sbe) (not (fboundp 'sbe)) (fset 'sbe 'org-sbe))
> # org-entities-user: nil
> # eval: (sbe "user-entities-local")
> # End:
It might be an order-of-evaluation problem. What happens if you set
org-entities-user to nil first thing in the code block rather than in
the local variables?
Nick