Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

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

1 Answer 1

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}
share|improve this answer
2  
Need to look pg 364 source2e.pdf You need to use '\LoadClassWithOptions' or '\PassOptionsToClass'. –  Yiannis Lazarides Feb 3 '13 at 15:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.