From: tsd@tsdye.com (Thomas S. Dye)
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Problem with org-entities-user
Date: Mon, 17 Sep 2012 06:37:10 -1000 [thread overview]
Message-ID: <m18vc8k3m1.fsf@tsdye.com> (raw)
In-Reply-To: <87k3vtgnhy.fsf@gmail.com> (Nicolas Goaziou's message of "Mon, 17 Sep 2012 08:41:13 +0200")
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Hello,
>
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> I'm probably doing something silly here, but can't figure it out. Using
>> the new LaTeX exporter, and with org-entities-user defined as below,
>> this:
>>
>> \C14 \frac12 \Omacron
>>
>> exports as:
>>
>> \C14 \textonehalf{} \={O}
>>
>> Why isn't my C14 entity being exported correctly?
>>
>> All the best,
>> Tom
>>
>> Value: (("U234" "\\textsuperscript{234}U" nil "<sup>234</sup>U"
>> "234U" "234U" "234U")
>> ("Th230" "\\textsuperscript{230}Th" nil "<sup>230</sup>Th" "230Th"
>> "230Th" "230Th")
>> ("C14" "\\textsuperscript{14}C" nil "" "14C" "14C" "14C")
>> ("Umacron" "\\={U}" nil "Ū" "U" "U" "Ū")
>> ("Omacron" "\\={O}" nil "Ō" "O" "O" "Ō")
>> ("Imacron" "\\={I}" nil "Ī" "I" "I" "Ī")
>> ("Emacron" "\\={E}" nil "Ē" "E" "E" "Ē")
>> ("Amacron" "\\={A}" nil "Ā" "A" "A" "Ā")
>> ("umacron" "\\={u}" nil "ū" "u" "u" "ū")
>> ("omacron" "\\={o}" nil "ō" "o" "o" "ō")
>> ("imacron" "\\={i}" nil "ī" "i" "i" "ī")
>> ("emacron" "\\={e}" nil "ē" "e" "e" "ē")
>> ("amacron" "\\={a}" nil "ā" "a" "a" "ā")
>> ("space" "\\ " nil " " " " " " " "))
>
> That's because numbers are not allowed in entities, except for a few
> exceptions:
>
> "\\\\\\(there4\\|sup[123]\\|frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]]\\)"
>
> Note that this regexp also matches LaTeX commands.
>
> One seducing idea would be to drop support for such commands (I'm _not_
> talking about math environments and snippets, but about commands like
> \hfill{} or \bigskip{}). After all, if you want to write raw LaTeX in an
> Org buffer, you can always use #+LATEX: or @@latex:...@@ like with any
> other back-end. I see no compelling reason to keep this convenience if
> it gets in the way.
>
> It would speed-up a bit entities matching, and would allow for a relaxed
> regexp (i.e. a regexp built upon already defined entities).
Thanks Nicolas. I was confused by the exceptional numbers into thinking
they were generally allowed.
I'm not sure about support for \hfill{}, etc. The new latex and html
exporters pass \hfill{} through unchanged, which might be what the latex
author wants, or what the html author writing about latex commands
wants.
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
next prev parent reply other threads:[~2012-09-17 16:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 2:32 Problem with org-entities-user Thomas S. Dye
2012-09-17 6:41 ` Nicolas Goaziou
2012-09-17 16:37 ` Thomas S. Dye [this message]
2012-09-19 13:15 ` Nicolas Goaziou
2012-09-19 14:55 ` Carsten Dominik
2012-09-19 15:55 ` Nicolas Goaziou
2012-09-19 17:00 ` Bastien
2012-09-19 19:23 ` Thomas S. Dye
2012-09-20 7:33 ` Carsten Dominik
2012-09-20 11:57 ` Nicolas Goaziou
2012-09-20 13:36 ` Carsten Dominik
2012-09-22 8:52 ` Nicolas Goaziou
2012-09-22 14:57 ` Carsten Dominik
2012-09-22 16:52 ` Thomas S. Dye
2012-09-23 8:30 ` Nicolas Goaziou
2012-09-23 10:01 ` Carsten Dominik
2012-09-23 18:18 ` Thomas S. Dye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m18vc8k3m1.fsf@tsdye.com \
--to=tsd@tsdye.com \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).