emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: Emacs Org mode <emacs-orgmode@gnu.org>
Subject: Bug with label names in beamer export
Date: Tue, 16 Jun 2015 21:11:16 +0200	[thread overview]
Message-ID: <20150616191116.GC20184@chitra.no-ip.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

Hi,

I encountered a strange problem today, exporting to beamer didn't
produce any pages eventhough it compiled just fine!  It turns out it's
how Org exported the labels.  They should be wrapped in {..}.  See this
TeX.SX question for more: http://tex.stackexchange.com/q/250640/4416

The attached patch should fix the issue.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.

[-- Attachment #2: 0001-ox-beamer-Wrap-labels-in-braces-in-beamer-export.patch --]
[-- Type: text/plain, Size: 1069 bytes --]

From e82cd7bf86dc01d1038a442fd66ba8b97ec7a23e Mon Sep 17 00:00:00 2001
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
Date: Tue, 16 Jun 2015 21:04:21 +0200
Subject: [PATCH] ox-beamer: Wrap labels in braces in beamer export

* lisp/ox-beamer.el (org-beamer--get-label): wrap labels in {..}

The `:' in the label name causes an argument parsing problem, for more
see <http://tex.stackexchange.com/q/250640/4416>.
---
 lisp/ox-beamer.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index dafadb3..3119bd4 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -337,7 +337,7 @@ function assumes HEADLINE will be treated as a frame."
     (if (and (stringp opt)
 	     (string-match "\\(?:^\\|,\\)label=\\(.*?\\)\\(?:$\\|,\\)" opt))
 	(match-string 1 opt)
-      (concat "sec:" (org-export-get-reference headline info)))))
+      (format "{sec:%s}" (org-export-get-reference headline info)))))
 
 (defun org-beamer--frame-level (headline info)
   "Return frame level in subtree containing HEADLINE.
-- 
2.4.3


             reply	other threads:[~2015-06-16 19:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 19:11 Suvayu Ali [this message]
2015-06-16 19:36 ` Bug with label names in beamer export Rasmus
2015-06-16 20:18   ` Nicolas Goaziou
2015-06-16 20:25     ` Rasmus
2015-06-16 20:41       ` Nicolas Goaziou
2015-06-17  6:35   ` Suvayu Ali

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=20150616191116.GC20184@chitra.no-ip.org \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).