1

I would like to insert silly quotes before the chapter headline. I am using scrbook / KOMAScript -- unfortunately in version 3.17a (texlive 2015).

I would also like to insert a rule below the chapter headline.

This is a small example:

\documentclass[chapterprefix=true]{scrbook}
\usepackage{blindtext}
\usepackage{scrhack}

\begin{document}

\setchapterpreamble{
\begin{flushright}
MySillyQuote
\end{flushright}}

\chapter{MyChapter}

\Blinddocument

\end{document}

What I would like to have is something like this:

The Goal

The preamble should be moved up (red) and there should be a line (highlighted in green, but should be regular black). Only chapters that have chapter-prefixes have chapter-preambles in my document and those chapters without prefixes should not reserve extra space for a preamble. For the remaining chapters it would be OK to hard-code the space for the chapter-preamble to e.g. 3 lines (although dynamic fit would obviously be preferable).

I have tried a few things using \chapterformat but they don't seem to work, because my KOMAScript is too old.

EDIT: no longer interested in the rule.

  • 2
    If memory serves (can't test now): \setchapterpreamble[o]{...}? – campa Feb 17 at 14:39
  • That was a lot easier than I had expected, I should have just RTFM. Thanks! I can even add a box above and below. However, if I add the box below with a \rule there is too much spacing between headline and rule... anyway to change that? – h-2 Feb 17 at 15:11
1

As the comment by @campa indicated [o] is sufficient to move the preamble up. Also \dictum helps with the quote:

\documentclass[chapterprefix=true]{scrbook}
\usepackage{blindtext}
\usepackage{scrhack}

\begin{document}

\setchapterpreamble[o]{
\dictum[Author]{quote}}

\chapter{MyChapter}

\Blinddocument

\end{document}

I have decided to not add the bar below for now and will open a separate question if necessary.

| improve this answer | |
0

As an answer to the general question there is the epigraph package that can be used with any class which enables an epigraph (silly quote) to be inserted wherever in the document. Here is an example of putting an epigraph before a chapter title:

\documentclass{book}
\usepackage{epigraph}
\begin{document}
\chapter*{Celestial navigation}
\epigraphhead[70]{\epigraph{Star crossed lovers.}{\textit{The Bard}}}
% ...

To put the epigraph after the chapter title don't use \epigraphhead simply

\chapter*{Celestial navigation}
\epigraph{Star crossed lovers.}{\textit{The Bard}}
| improve this answer | |

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.