From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: Re: Beamer export ignoring org-beamer-environments-extra? Date: Sat, 20 Apr 2013 14:14:22 +0800 Message-ID: References: Reply-To: jamshark70@dewdrop-world.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTR44-0003VQ-Eh for Emacs-orgmode@gnu.org; Sat, 20 Apr 2013 02:14:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UTR43-0000kz-Gt for Emacs-orgmode@gnu.org; Sat, 20 Apr 2013 02:14:24 -0400 Received: from mail-ob0-x232.google.com ([2607:f8b0:4003:c01::232]:45317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTR43-0000kr-BG for Emacs-orgmode@gnu.org; Sat, 20 Apr 2013 02:14:23 -0400 Received: by mail-ob0-f178.google.com with SMTP id 16so146270obc.23 for ; Fri, 19 Apr 2013 23:14:22 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Emacs-orgmode@gnu.org" On Sat, Apr 20, 2013 at 12:25 PM, James Harkins 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