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

> I see. Nice example for the *latex* exporter.
>
> However, would something like that be necessary for beamer or will the
> default definition of org-latex-classes in ox-beamer be enough?

Take a look at
https://github.com/fniessen/refcard-org-beamer
There, users are advised to do the following

(eval-after-load "ox-latex"

  ;; update the list of LaTeX classes and associated header (encoding, etc.)
  ;; and structure
  '(add-to-list 'org-latex-classes
                `("beamer"
                  ,(concat "\\documentclass[presentation]{beamer}\n"
                           "[DEFAULT-PACKAGES]"
                           "[PACKAGES]"
                           "[EXTRA]\n")
                  ("\\section{%s}" . "\\section*{%s}")
                  ("\\subsection{%s}" . "\\subsection*{%s}")
                  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))

With the above setup the ORG-NEWS entry will no longer be accurate

      +*** ox-beamer: New LaTeX preamble sequence
      +
      +When exporting to Beamer, all theme-related configuration will be
      +generated right after the document class declaration in concordance
      +with the examples shipped with the Beamer class.  Previously, the
      +theme configuration went after the whole LaTeX preamble and the beamer
      +frame definition, if it was needed.


      +    (mapconcat #'org-element-normalize-string
      +               ;;
      +               ;; Put all class related stuff here.
      +               ;; ox-beamer and other classes should inject
      +               ;; code that needs to go just after the class
      +               ;; is defined using :latex-class-post
      +               ;;
      +        (list (and (not snippet?)
      +                   (plist-get info :latex-class-pre))
      +                     pre-template
      +                     (and (not snippet?)
      +                          (plist-get info :latex-class-post)))
      +               "")))

PRE-TEMPLATE above will contain documentclass, default package, and
everything else together. So :latex-class-post will be added at the very
end of the latex preamble.

> I wouldn't have dared to start this if I hadn't had a presentation where I
> didn't get what I was reading in the org file.
>
> Would it be worthwhile at least to try to agree on a basic flow of LaTeX
> blocks for beamer?

Did we disagree on this? I have no objections to putting theme
definition early. I only have comments on the implementation.

> Could you please try the features out by exporting them to a LaTeX buffer
> and telling me if it doesn't agree +/- with what the authors of beamer tell
> their users to do? Isn't that what the beamer exporter do too?

It looks like you think that I missed something in the discussion. Could
you please put it more straight what exactly it is that I missed?

> PS: After my work on the all-tex-fonts branch I have started to realise
> that there are too many trees that will not let us see the forest... Try to
> seek to make things simpler...

Could you elaborate?

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