2

I started to read the documentation on the KOMA Script classes because they seem to have many tools that are more flexible to use than the standard classes, But I don't understand where to put all the options. Is within \documentclass the best place, or not?

By example:

\documentclass[headsepline=true,paper=letter,headings=small,DIV=10]{scrbook}
\usepackage{typearea}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{bera}
\usepackage[berasans]{quotchap}
\usepackage[nouppercase]{scrpage2}
\pagestyle{scrheadings}
\usepackage{blindtext}

\begin{document}
\Blinddocument
\end{document}

This compiles well but the headsepline doesn't appear, and also the heading size doesn't change. If the class options are not the best place for it, where or how can I add these optional values?

On the other hand, regarding fonts, KOMA Script uses a sans serif for headings and other stuff, and serif fonts for text. After reading this: How to set a document for use with the Bera fonts instead the default fonts? I understand that if I want to use LaTeX fonts (without XeTeX) I need to load the page of each font and then KOMA will use them. Am I right? [In the example I use bera fonts because the package include both fonts.]

4

You can set KOMAoptions at nearly every point in the document, but you have to make sure that they are passed and processed correctly. With the (soon obsolete) package scrpage2 you had to give the option headsepline to the package directly. Using the new scrlayer-scrpage allows you to set the headsepline as a documentclass option.
As esdd made me aware, that is not correct. Package scrpage2 simply doesn't know the key-value-pair headsepline=true. One can set the global option headsepline which will be picked up (even without loading a special package) by setting \pagestyle{headings}. Setting \pagestyle{scrheadings} (provided by scrpage2) also does the trick.
With the successor scrlayer-scrpage the difference between headings and scrheadings is gone.

\documentclass[headsepline=true,paper=letter,headings=small,DIV=10]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{bera}
%\usepackage[berasans]{quotchap}
\usepackage[markcase=ignoreuppercase]{scrlayer-scrpage}
\usepackage{blindtext}

\begin{document}
\blinddocument
\clearpage
\KOMAoption{headsepline}{false}
\blinddocument
\end{document}

Now to the fonts you mentioned. KOMA uses a lot of internal helper macros. That is the only way to provide a user with options like headings=small. The internal interface is, let's call it advanced. Packages like quotchap or titlesec use the basic LaTeX interface.

In comparison, KOMA provides a simple user interface working with a complicated internal interface. Getting a KOMA mechanic an tell him what to do, he opens his fancy-a** toolbox and gets to work. Now you call in the (standard) guy for the headings, he is not as advanced, but been around for a while. He's got one screwdriver and a hammer, that's it. And if something won't fit, a good whack with his hammer can solve the problem.

To sum it up, a package like quotchap messes up the well constructed internals of KOMA-script.

I just had a look at the documentation and code of package quotchap. It claims to cooperate with KOMA-script. It takes the definition of the original KOMA chapter and redefines it. quotchap started in 1998, 15 years have passed, lots of water went down stream and KOMA got heavily extended (adding specialized tools to the box). quotchap never learned these enhancements.

  • Thanks for the explanation, how do you know the scrpage2 package will be obsolete, what should I learn instead? What do you recommend me to change the heading layout of the chapters without use quotchapt? – Iraultza Belaustegigoitia Oct 6 '14 at 19:12
  • The german documentation is a bit more verbose on the matter of scrpage2. It states, that scrlayer-scrpage is more advanced and will be developed further. The development of scrpage2 has stopped. Both packages have the same basic user interface. – Johannes_B Oct 8 '14 at 7:28
  • Concerning the heading layout: It is basically the same as quotchap does it internally. Take the original definition and customize it to your needs. There are two ways, doing it simple but loosing optional features (headings=small etc) or doing a more robust approach, taking all the optional stuff into account. The decision is yours to take. – Johannes_B Oct 8 '14 at 7:31
  • 1
    I tought about defining an interface taking into account the different keys for headings but i realized after a short time that this a pretty big amount of work, taking everything into account. – Johannes_B Oct 9 '14 at 8:36
  • Thanks I understand and I think the same, I'll see how to do it easy. – Iraultza Belaustegigoitia Oct 12 '14 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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