From mboxrd@z Thu Jan 1 00:00:00 1970 From: zwz Subject: Re: [beamer] a bug in exporting Date: Thu, 12 May 2011 21:26:26 +0800 Message-ID: <87liyct5h9.fsf@gmail.com> References: <87tyd1wfhk.fsf@gmail.com> <87k4dw1jfi.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKVrT-0007w2-FX for emacs-orgmode@gnu.org; Thu, 12 May 2011 09:23:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKVrP-0005EG-Fs for emacs-orgmode@gnu.org; Thu, 12 May 2011 09:23:27 -0400 Received: from lo.gmane.org ([80.91.229.12]:49404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKVrP-0005EB-6i for emacs-orgmode@gnu.org; Thu, 12 May 2011 09:23:23 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QKVrN-0008Fo-4P for emacs-orgmode@gnu.org; Thu, 12 May 2011 15:23:21 +0200 Received: from 221.12.171.101 ([221.12.171.101]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 May 2011 15:23:21 +0200 Received: from zhangweize by 221.12.171.101 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 May 2011 15:23:21 +0200 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 Eric S Fraga writes: > zwz writes: > >> In a org file I have >> >> * what is x? >> #+BEGIN_SRC c >> char (*(*x())[])(); >> #+END_SRC >> \pause >> char \fbox{\fbox{(*\fbox{\fbox{(*\fbox{x()})}[]})}()}; >> >> The latex generated for the last line turned out to be >> char \fbox\{\fbox\{(*\fbox{\fbox{(*\fbox{x()})}[]})\}()\}; >> which is not expected. >> >> Is it a bug? I am using Emacs 23.3.1 and org 7.4, by the way. > > I am not sure if the regex for identifying latex snippets inline has > changed or not but an expression like this one is going to test that > regex to the limit in any case. I would suggest that you use the latex > directive directly given that the code is not likely to export sensibly > to any other target anyway: > > * what is x? > #+BEGIN_SRC c > char (*(*x())[])(); > #+END_SRC > \pause > #+LATEX: char \fbox{\fbox{(*\fbox{\fbox{(*\fbox{x()})}[]})}()}; > > Code like this reminds me why I left the C world more than 15 years > ago... ;-) Problem solved by the latex directive. Thanks. The C code is from K&R's book. :) BTW, I also use some code like this in headlines (\textcolor, \fbox), where I guess the latex directive can not work. Is there any solutions for this situation or any better way to colorize the text while also support to export to other target (e.g. html)?