Herbert Voss wrote: >> Isn't RequirePackage for packages and classes and usepackage for the >> preamble (this is what I read in the documents)? > > yes and no ...
Why yes, why no? >> How about the attached? Makes the code even simpler. > > I forget the order of loading packages. Was ist first LyX and > then user or vice versa? \PassOptionsToPackage makes only > sense when the package was not loaded. WHich is the reason > why these macros are always placed befor or after > \documentclass. First LyX, then user (except babel, which is loaded at the very end). However, in the case of beamer, that is -- as the document class -- loaded first. I think, for the actual beamer problem, the proposed solution is sufficient. For later, I'd propose to add a method to LaTeXFeatures.C that takes care of all options and passes them to the corresponding packages with \PassOptionsToPackage (at the moment, we have lots of packages calls which pass the options as optional arguments). Those macros will all be written immediately after \documentclass. We could combine it with \ProvidesPackage. When a documentclass already loads a package, we could then pass the options directly to the documentclass. Does this make sense? Jürgen