emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Beamer export ignoring org-beamer-environments-extra?


From: James Harkins
Subject: Re: [O] Beamer export ignoring org-beamer-environments-extra?
Date: Sat, 20 Apr 2013 14:14:22 +0800

On Sat, Apr 20, 2013 at 12:25 PM, James Harkins <address@hidden> wrote:
> The problem may be a general one concerning org-beamer-environments-extra.
>
> Any portion of the document containing Chinese characters should be
> enclosed within a CJK environment. Reading ox-beamer.el, I see that I
> can customize Org Beamer Environments Extra. After customizing, C-h v
> org-beamer-environments-extra shows me:
>
> (("CJK" "Z" "\\begin{CJK}%a%h" "\\end{CJK}"))
... snip
> Whoa, wait a minute... it has completely omitted the CJK environment!

OK, after a bite for lunch, I see what the problem is.

The CJK environment, in the LaTeX code, must be specified with all
capital letters. (I tried changing the simple test file to say
"\begin{cjk}" and LaTeX failed, complaining of an unknown environment.
The test file does include "\usepackage{CJK}" and it works with
"\begin{CJK}" so the lowercase definitely means "misspelled" here.)

The Beamer exporter assumes that environment names will be all lowercase:

 ;; Use specified environment.
 (t (downcase env)))))

I added my entry into org-beamer-environments-extra with the name
"CJK" -- so, when org-beamer-- format-block looks up the environment's
formatting spec according to the down-cased name "cjk," it finds
nothing and then does not render the environment. But, if I were to
name the environment-extra as "cjk," then the exporter would write
"\begin{cjk}" which I've already found will break.

I will temporarily work around the problem by removing "downcase."
That should get me going for the slides I need to prepare today and
tomorrow. But there must be a more elegant solution. I'm not sure what
that is, but I am certain that it is not safe to assume environments
will always be named using only lowercase letters.

One more reason to fix: There is one out-of-the-box environment,
noteNH, which includes capital letters in the name. This one is also
broken -- does not appear in the output. I.e., you can encounter the
bug without customizing anything.

hjh



reply via email to

[Prev in Thread] Current Thread [Next in Thread]