From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: Re: ox-beamer and CUSTOM_ID Date: Thu, 15 Oct 2015 21:25:45 +0200 Message-ID: References: <87pp0izi1f.fsf@nicolasgoaziou.fr> <87h9luzgyd.fsf@nicolasgoaziou.fr> <874mhuze22.fsf@nicolasgoaziou.fr> <87vbaaxvia.fsf@nicolasgoaziou.fr> <87k2qpy85j.fsf@nicolasgoaziou.fr> <87wpuowmrn.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1137b4f86babba052229a618 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmoAA-0007A0-BW for emacs-orgmode@gnu.org; Thu, 15 Oct 2015 15:26:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmoA9-0001AE-7t for emacs-orgmode@gnu.org; Thu, 15 Oct 2015 15:26:06 -0400 Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:36671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmoA9-0001A9-1O for emacs-orgmode@gnu.org; Thu, 15 Oct 2015 15:26:05 -0400 Received: by oihr205 with SMTP id r205so52059968oih.3 for ; Thu, 15 Oct 2015 12:26:04 -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: Fabrice Popineau , "emacs-orgmode@gnu.org" --001a1137b4f86babba052229a618 Content-Type: text/plain; charset=UTF-8 2015-10-15 18:54 GMT+02:00 Fabrice Popineau : > > > 2015-10-15 10:37 GMT+02:00 Nicolas Goaziou : > >> Fabrice Popineau writes: >> >> > At some point LaTeX reported an error on some frame heading. >> > I wrongly inferred it could be the label. >> >> It would be nice to investigate about this error, it it persists. >> >> > Beamer is very bad at reporting errors at their true origin. > > Actually, I had 2 errors. > > First all my Org->TeX files use Babel, and they doesn't seem to cope well > with colons in labels. > (org-lint even reports about it) > Unfortunately, the default naming scheme for internal labels is using > colons. > Hence I wanted to use my own labels. > > (Actually, I don't understand what prevents "beamer 2015/01/05 3.36" to > use colons in > labels. I thought that this problem has been solved around beamer 3.30.) > Oh! I got it. The problem is that beamer expects braces around a label with colon when you setup the label but *not when you ref it* : \begin{frame}[label={sec:orgheadline1}]{Frame 1} bla bla bla bla bla bla bla bla bla bla bla bla \end{frame} \againframe{sec:orgheadline1} The braces at setup are required by the keyval package which is used to parse the options. However, the label is called sec:orgheadline1 and not {sec:orgheadline1}. But at the moment, ox-beamer outputs : \againframe{{sec:orgheadline1}} I fixed it unintentionally by using my own label without colon. So basically you need this: diff --git a/vendor/org-mode/lisp/ox-beamer.el b/vendor/org-mode/lisp/ox-beamer.el index 24dcf19..75b51df 100644 --- a/vendor/org-mode/lisp/ox-beamer.el +++ b/vendor/org-mode/lisp/ox-beamer.el @@ -621,7 +623,7 @@ as a communication channel." (org-export-resolve-id-link link info)))) ;; Now use user-defined label provided in TARGET ;; headline, or fallback to standard one. - (format "{%s}" (org-beamer--get-label target info))))))) + (format "%s" (org-beamer--get-label target info))))))) ;; Case 2: Creation of an appendix is requested. ((equal environment "appendix") (concat "\\appendix" Fabrice --001a1137b4f86babba052229a618 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


2015-10-15 18:54 GMT+02:00 Fabrice Popineau <fabrice.popineau= @gmail.com>:


2015-10= -15 10:37 GMT+02:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:
Fabrice Popineau <fabrice.popineau@gmail.com&g= t; writes:

> At some point LaTeX reported an error on some frame heading.
> I wrongly inferred it could be the label.

It would be nice to investigate about this error, it it persists.

Beamer is very bad= at reporting errors at their true origin.

Actuall= y, I had 2 errors.

First all my Org->TeX files = use Babel, and they doesn't seem to cope well with colons in labels.
(org-lint even reports about it)
Unfortunately, the defau= lt naming scheme for internal labels is using colons.=C2=A0
Hence= I wanted to use my own labels.

(Actually, I = don't understand what prevents "beamer 2015/01/05 3.36" to us= e colons in
labels. I thought that this problem has been solved a= round beamer 3.30.)

Oh! I got it.

The problem is that beamer ex= pects braces around a label with colon when you setup the label
b= ut *not when you ref it* :

\begin{frame}[label=3D{= sec:orgheadline1}]{Frame 1}
bla bla bla bla bla bla bla bla bla b= la bla bla
\end{frame}

\againframe{sec:o= rgheadline1}

The braces at setup are required by t= he keyval package which is used to parse the options.
However, th= e label is called sec:orgheadline1 and not {sec:orgheadline1}.
Bu= t at the moment, ox-beamer outputs :

\againframe{{= sec:orgheadline1}}=C2=A0

I fixed it unintentionall= y by using my own label without colon.

So basicall= y you need this:

diff --git a/vendor/org-mode= /lisp/ox-beamer.el b/vendor/org-mode/lisp/ox-beamer.el
index 24dc= f19..75b51df 100644
--- a/vendor/org-mode/lisp/ox-beamer.el
=
+++ b/vendor/org-mode/lisp/ox-beamer.el
@@ -621,7 +623,7 @@ = as a communication channel."
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-export-resolve-id-link link info))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ;; Now use user-defined label provided in TARGET
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;= ; headline, or fallback to standard one.
- =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (format "{%s}" (= org-beamer--get-label target info)))))))
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (format "%s" (or= g-beamer--get-label target info)))))))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 ;; Case 2: Creation of an appendix is requested.
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 ((equal environment "appendix")
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 (concat "\\appendix"


Fabrice
--001a1137b4f86babba052229a618--