6

I'm trying to create my own class using scrbook as a base class, and biblatex as for my bibliography. Consider this MWE:

\documentclass[bibliography=totoc,fontsize=12]{scrbook}
\usepackage{filecontents}
\begin{filecontents}{refs.bib}
@book{electrodynamics,
    Author={Eringen, A.C. and Maugin, G.A.},
    Title={Electrodynamics of Continua},
    Year={1990}
}
\end{filecontents}

\usepackage{biblatex}

\bibliography{refs}

\begin{document}
\tableofcontents
\nocite{*}
\printbibliography
\end{document}

This works as expected, i.e. the bibliography shows up in the ToC. Now, my seemingly equivalent self-made class

\ProvidesClass{myclass}

\LoadClass[
    bibliography=totoc,
    fontsize=12
    ]{scrbook}

\RequirePackage{biblatex}

used like so

\documentclass{myclass}
\usepackage{filecontents}
\begin{filecontents}{refs.bib}
@book{electrodynamics,
    Author={Eringen, A.C. and Maugin, G.A.},
    Title={Electrodynamics of Continua},
    Year={1990}
}
\end{filecontents}

\bibliography{refs}

\begin{document}
\tableofcontents
\nocite{*}
\printbibliography
\end{document}

does not have a bibliography entry in the ToC. The fontsize option (and almost all the others I've tried) get passed as expected. What's going on?

3
  • Does it work with the option toc=bibliography (or toc=bib)?
    – cgnieder
    Feb 3, 2013 at 14:19
  • No, it doesn't. At least not on my system (current TeXLive 2012 btw).
    – Psirus
    Feb 3, 2013 at 14:20
  • The global options are those passed to \documentclass, not those passed to \LoadClass.
    – egreg
    Feb 3, 2013 at 14:35

1 Answer 1

4

While I don't have a clue why this happens, here's a workaround: change your class to

\ProvidesClass{myclass}

\LoadClass[
    fontsize=12
    ]{scrbook}

\PassOptionsToPackage{bibliography=totoc}{biblatex}

\RequirePackage{biblatex}
1
  • 2
    Need to look pg 364 source2e.pdf You need to use '\LoadClassWithOptions' or '\PassOptionsToClass'.
    – yannisl
    Feb 3, 2013 at 15:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .