Last active
November 15, 2016 22:33
-
-
Save gtuckerkellogg/41a924445a814f2d49dd to your computer and use it in GitHub Desktop.
Org mode caption export filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-org-beamer-caption (contents backend info) | |
"Org export filter to allow use of #+CAPTION: keywords in | |
beamer org export, by removing floats using the \\captionof* | |
macro. Requires use of the caption package " | |
(when (eq backend 'beamer) | |
(replace-regexp-in-string | |
"\\\\caption\{" "\\\\captionof*{figure}{" | |
(replace-regexp-in-string | |
"\\\\end\{figure\}" "%" | |
(replace-regexp-in-string "\\\\begin\{figure\}" "%" contents))))) | |
(add-to-list 'org-export-filter-final-output-functions 'my-org-beamer-caption) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment