emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: zwz <zhangweize@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [beamer] a bug in exporting
Date: Thu, 12 May 2011 08:12:33 +0100	[thread overview]
Message-ID: <87k4dw1jfi.fsf@ucl.ac.uk> (raw)
In-Reply-To: <87tyd1wfhk.fsf@gmail.com> (zwz's message of "Wed, 11 May 2011 21:09:43 +0800")

zwz <zhangweize@gmail.com> 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:

--8<---------------cut here---------------start------------->8---
* what is x?                                            
  #+BEGIN_SRC c                                         
  char (*(*x())[])();                                   
  #+END_SRC                                             
  \pause                                                
  #+LATEX: char \fbox{\fbox{(*\fbox{\fbox{(*\fbox{x()})}[]})}()};
--8<---------------cut here---------------end--------------->8---

Code like this reminds me why I left the C world more than 15 years
ago... ;-)
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.274.gd6aba)

  reply	other threads:[~2011-05-12  8:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11 13:09 [beamer] a bug in exporting zwz
2011-05-12  7:12 ` Eric S Fraga [this message]
2011-05-12 13:26   ` zwz
2011-05-12 22:05     ` Eric S Fraga
2011-05-13  9:40       ` Eric S Fraga

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=87k4dw1jfi.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=zhangweize@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).