emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* modify frame title in beamer export
@ 2020-04-05  9:28 Gürtler, Martin
  2020-04-05 12:36 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Gürtler, Martin @ 2020-04-05  9:28 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi,

I'd like to modify the frame title in beamer export based on
properties or priority as this is possible in latex export.

In latex export, one can set the variable
org-latex-format-headline-function to the name of a function that
creates the content of the headline. I was able to use this in
latex export.

As beamer export is derived from latex export I had hoped that 
this
would automatically work for beamer export as well, but this
is not the case, the headlines in beamer export are not modified.

A second question is, whether one could also use properties to
format the headlines. The arguments of the user supplied function
include tags, but not properties. 

Thanks,

Martin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: modify frame title in beamer export
  2020-04-05  9:28 modify frame title in beamer export Gürtler, Martin
@ 2020-04-05 12:36 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2020-04-05 12:36 UTC (permalink / raw)
  To: Gürtler, Martin; +Cc: emacs-orgmode

Hello,

"Gürtler, Martin" <martin.guertler@htwk-leipzig.de> writes:

> I'd like to modify the frame title in beamer export based on
> properties or priority as this is possible in latex export.
>
> In latex export, one can set the variable
> org-latex-format-headline-function to the name of a function that
> creates the content of the headline. I was able to use this in
> latex export.
>
> As beamer export is derived from latex export I had hoped that this
> would automatically work for beamer export as well, but this
> is not the case, the headlines in beamer export are not modified.
>
> A second question is, whether one could also use properties to
> format the headlines. The arguments of the user supplied function
> include tags, but not properties. 

I suggest to create a function modifying the headline element in the
parse tree, and add it to `org-export-filter-parse-tree-functions'. This
way, you have access to all properties and what not, and can replace the
headline by whatever you need. E.g., (untested):

    (defun my-beamer-frame-title-filter (ast backend info)
      (cond
       ((not (org-export-derived-backend-p 'beamer)) ast)
       (t
        (org-element-map ast 'headline
          (lambda (h)
            (when (equal (org-export-get-node-property :A h) "foo")
              (org-element-put-property h :title "FOO!")))
          info)
        ast)))

HTH,

-- 
Nicolas Goaziou


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

end of thread, other threads:[~2020-04-05 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05  9:28 modify frame title in beamer export Gürtler, Martin
2020-04-05 12:36 ` 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).