josephwright / beamer

A LaTeX class for producing presentations and slides
Other
1.35k stars 139 forks source link

beamer removes options with equal sign from the class option list #815

Open u-fischer opened 1 year ago

u-fischer commented 1 year ago

beamer internally loads the package beamerbaseoptions and then calls \beamer@filterclassoptions. This removes options with equal sign from \@classoptionslist:

\documentclass[bla,abc=blub]{article}
\usepackage{etoolbox}
\usepackage{beamerbaseoptions}
\makeatletter
\show\@raw@classoptionslist
\show\@classoptionslist
\beamer@filterclassoptions
\show\@raw@classoptionslist
\show\@classoptionslist

\begin{document}
xxx
\end{document}

gives

> \@raw@classoptionslist=macro:
->bla,abc=blub.
l.59 \show\@raw@classoptionslist

? 
> \@classoptionslist=macro:
->bla,abc=blub.
l.60 \show\@classoptionslist

? 
> \@raw@classoptionslist=macro:
->bla,abc=blub.
l.62 \show\@raw@classoptionslist

? 
> \@classoptionslist=macro:
->,bla.
l.63 \show\@classoptionslist

(extracted from https://tex.stackexchange.com/q/669273/2388)

josephwright commented 1 year ago

'Yes' ... that's all by-design after all: beamer has a very particular view on what should be passed as options. Not sure what you are suggesting is wrong here.

u-fischer commented 1 year ago

Well it is a bit curious if some options simply disappear, and as far as I can see this is not documentated. Is this cleaning up still needed?

josephwright commented 1 year ago

@u-fischer I mean that beamer views class options as exactly that: options for the class. That's why you have to explicitly pass those that beamer knows to pass on to for example hyperref. Giving beamer other stuff is not going to work ... so to me this is user error.

u-fischer commented 1 year ago

I mean that beamer views class options as exactly that: options for the class.

But that is not true. If you do

\documentclass[ngerman]{beamer}
\usepackage{babel}

then the option is passed without problem. beamer removes only options with equal sign, not the others. And the special options for hyperref and xcolor are only needed because beamer load the packages.

To me it looks as if beamer was trying to avoid that packages fall over the keyval options and so removed them from the list. But perhaps this is no longer needed?