Pedro Andres Aranda Gutierrez <[email protected]> writes:

> It passes all  latex and beamer tests and, more importantly,
> it does break my LaTeX exports and Beamer(tm).

does *not* break, right?

> Comments and further tests highly appreciated.
 ...
> Subject: [PATCH 3/3] Remove the beamer-theme header creation from
>  (org-beamer-template)
>
> lisp/ox-beamer.el: (org-beamer-template): Don't
> call (org-beamer-theme-header) here.
> lisp/ox-latex.el: import (org-bameer-theme-header) and use it
> in (org-latex-make-preamble) as part of the header creation code.

That's a bad idea to call ox-beamer functions from inside ox-latex.
This will lead to unmaintainable code if we mix different libraries.

If you want to modify how ox-latex generates the preamble, what about
modifying

(unless (assoc "beamer" org-latex-classes)
  (add-to-list 'org-latex-classes
               '("beamer"
                 "\\documentclass[presentation]{beamer}"
                 ("\\section{%s}" . "\\section*{%s}")
                 ("\\subsection{%s}" . "\\subsection*{%s}")
                 ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))

?

Or, alternatively, you can dynamically splice the theme into
:latex-classes in the INFO inside `org-beamer-template' before calling
`org-latex-make-preamble'.

> +  : #+BEAMER_THEME_PRE: \usepage{geometry}

\usepackage?

> +    (concat
> +     pre-header
> +     (mapconcat (lambda (args) (apply format-theme args))

I'd write (lambda (prop command) ...) explicitly. That's more readable IMHO.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to