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

> B. Things that need further thought:
>
> 1.- It is advisable to put the sequence
> BEAMER_THEME_PRE
> BEAMER_THEME
> BEAMER_THEME_POST
> directly after the class declaration. This is what the Beamer authors do in
> their examples.

Sounds reasonable.

> 2.- It is advisable to put "all things font" ASAP.
> Why? you may have LaTeX code in your header that will be stored with the
> 'full state' to be called later.
> An example would be using \savebox{} for certain parts in the header of a
> document (in LATEX_HEADER).
> If you change the fonts after declaring the boxes, this declaration has no
> effect in the saved boxes
> and you will get wrong fonts there. Moving the font packages out of the
> default classes and
> into font handling might be helpful.... even for pdflatex.

Except BEAMER_THEME, right?
So, we do need FONTS_PRE.

> My request:
> 1. if you want to use templates, make sure there is room for these extra
> things there to avoid needed patching the generated code with (sometimes
> intricate) search/replace processes which may not be self-evident in the
> code. It will be more readable and all (starting by you) will profit

I am open to modifying the default template.

> 2. Agree on a default sequence for Beamer/LaTeX (taking into account what I
> mention above; promise it will help others...):
>
> For LaTeX
> [CLASS-PRE]
> \documentclass[options]{class}
> [FONTS]
> [PACKAGES]
> [PACKAGES-EXTRA]
> [HEADER]
> [HEADER-EXTRA]

I'd say

[CLASS-PRE]
\documentclass[options]{class}
[FONTS_PRE]
[FONTS]
[DEFAULT-PACKAGES]
[USER-PACKAGES]
[HEADER]
[HEADER-EXTRA]

> And for BEAMER
> [CLASS-PRE]
> \documentclass[options]{beamer}
> [BEAMER-THEME]
> [FONTS]
> [PACKAGES]
> [PACKAGES-EXTRA]
> [HEADER]
> [HEADER-EXTRA]

BEAMER-THEME can plug into FONTS_PRE with my idea.
WDYT?

> PS: I'm sending a PR to  https://github.com/fniessen/refcard-org-beamer to
> investigate how that eval-after-load is helpful...

I do not see anything there.

> PPS: Maybe novice users don't want to have to manage that kind of
> configuration and would be happier without it and with as few setq's as
> possible. At least that's what my students and colleagues comment.

Yes, of course.
There is always a tension between configurability for expert users and
good defaults. Ideally, we should have both... ideally.

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