emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: "Gürtler, Martin" <martin.guertler@htwk-leipzig.de>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: modify frame title in beamer export
Date: Sun, 05 Apr 2020 14:36:12 +0200	[thread overview]
Message-ID: <87o8s6az43.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <9c314626-12bf-48f1-b74f-659472b32df6@ITSZ-EXCH-MBX12.htwk-leipzig.de> ("Gürtler, Martin"'s message of "Sun, 5 Apr 2020 09:28:56 +0000")

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


      reply	other threads:[~2020-04-05 12:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-05  9:28 modify frame title in beamer export Gürtler, Martin
2020-04-05 12:36 ` Nicolas Goaziou [this message]

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=87o8s6az43.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=martin.guertler@htwk-leipzig.de \
    /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).