Hi

On Mon, 6 Apr 2026 at 13:41, Ihor Radchenko <[email protected]> wrote:

> 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?
>
Blame it on my cold ;-) Of course, it does *not* break anything.

>
> > 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.
>

I was just trying to keep beamer code in ox-beamer.el
But there is nothing that would break if we moved the function from
ox-beamer.el to ox-latex.el. info will have the properties anyhow and
independently
of where the code is placed, or is there?

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'.
>

Isn't that a bit of an overkill? Since the information is already there....
This was just a way of keeping beamer stuff things together. But it really
doesn't have to.
I feel that moving the function from ox-beamer to ox-latex makes the trick
cleaner.


> > +  : #+BEAMER_THEME_PRE: \usepage{geometry}
>
> \usepackage?
>
Yes.. will fix that...

>
> > +    (concat
> > +     pre-header
> > +     (mapconcat (lambda (args) (apply format-theme args))
>
> I'd write (lambda (prop command) ...) explicitly. That's more readable
> IMHO.
>

I was trying to just factor out the original code and not touch it. And
that is how it was originally...


>
> --
> 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>
>
Best, /PA


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

"Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE!
Year 2 of the New Koprocracy

Reply via email to