emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* CUSTOM_id ignored on blocks by ox-beamer
@ 2020-05-23 20:13 Rafael
  2020-05-25 10:46 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael @ 2020-05-23 20:13 UTC (permalink / raw)
  To: Emacs-orgmode list


Consider the following example:

#+begin_src org
,#+title: Test

,#+options: H:2

,* Section
  :PROPERTIES:
  :CUSTOM_ID: section
  :END:

,** Frame
   :PROPERTIES:
   :CUSTOM_ID: frame
   :END:

,*** Block
    :PROPERTIES:
    :CUSTOM_ID: block
    :END:
#+end_src

If I export this to Beamer, then both section and frame get appropiate
labels, (either with org-latex-prefer-user-labels set to t or nil), but
the custom_id for block is completely ignored. I want to use theorems as
blocks in frames, so it would be very useful to me if the custom_id in
the block is exported as \label{block}. Is there a way to have this by
setting a variable, or something?

It works if I include #+beamer: \label{block} below the properties
drawer, but I would prefer not to duplicate the label, of course.

Best regards,
Rafael


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: CUSTOM_id ignored on blocks by ox-beamer
  2020-05-23 20:13 CUSTOM_id ignored on blocks by ox-beamer Rafael
@ 2020-05-25 10:46 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2020-05-25 10:46 UTC (permalink / raw)
  To: Rafael; +Cc: Emacs-orgmode list

Hello,

Rafael <rvf0068@gmail.com> writes:

> Consider the following example:
>
> #+begin_src org
> ,#+title: Test
>
> ,#+options: H:2
>
> ,* Section
>   :PROPERTIES:
>   :CUSTOM_ID: section
>   :END:
>
> ,** Frame
>    :PROPERTIES:
>    :CUSTOM_ID: frame
>    :END:
>
> ,*** Block
>     :PROPERTIES:
>     :CUSTOM_ID: block
>     :END:
> #+end_src
>
> If I export this to Beamer, then both section and frame get appropiate
> labels, (either with org-latex-prefer-user-labels set to t or nil), but
> the custom_id for block is completely ignored. I want to use theorems as
> blocks in frames, so it would be very useful to me if the custom_id in
> the block is exported as \label{block}. Is there a way to have this by
> setting a variable, or something?
>
> It works if I include #+beamer: \label{block} below the properties
> drawer, but I would prefer not to duplicate the label, of course.

You may want to look into `org-beamer--format-block' and see if there's
an appropriate place to insert it, probably extending
`org-beamer--get-label' to handle non-frame cases along the way.

Regards,

-- 
Nicolas Goaziou


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-25 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23 20:13 CUSTOM_id ignored on blocks by ox-beamer Rafael
2020-05-25 10:46 ` Nicolas Goaziou

Code repositories for project(s) associated with this 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).