1

After finishing my thesis I am starting to write a book with all my poems. Due to my thesis I am used to scrbook class and can handle koma script a bit. But I fail at adjusting the section headings. Consider the following MWE (using LuaLaTeX and depicting a typical verse scheme of mine) using a design I asked for before.:

\documentclass{scrbook}     
\usepackage[no-math]{fontspec}
\usepackage{Alegreya}

\usepackage{xcolor} \usepackage{pgf} \usepackage{tikz}

\usepackage{blindtext}

\definecolor{themecolor}{RGB}{180, 220, 70}

% Design Chapter \renewcommand\raggedchapter{\raggedleft} \setkomafont{chapter}{\Huge} \setkomafont{chapterprefix}{\large\scshape\rmfamily}

\tikzset{ headings/base/.style = { outer sep = 5pt, inner sep = 0pt, inner xsep = 10pt, }, headings/chapterbackground/.style = { headings/base, font = \strut,% equal height no matter if capitals or 'g', 'p', etc are used or not }, headings/chapapp/.style = { headings/base, text = themecolor, font = \usekomafont{chapterprefix} }, headings/chapterline/.style = { themecolor, line width = 2pt, } }

\makeatletter% \renewcommand*\chapterlinesformat[3]{% \ifstr{#1}{chapter}{% \begin{tikzpicture}[baseline=(title.base)] \nodeheadings/chapterbackground{% \parbox[t] {\dimexpr\textwidth-2\pgfkeysvalueof{/pgf/outer xsep}\relax}% {\raggedchapter #3}% }; \node[headings/chapapp,anchor=south east] at ([xshift=0pt, yshift=-12pt]title.north east){\ifstr{#2}{}{}{\chapapp}\strut};% Positionierung chapterprefix \useasboundingbox (current bounding box.north west) rectangle ([xshift=0pt, yshift=-10pt]current bounding box.south east);% \draw[headings/chapterline] (current bounding box.south east)++(0.5\pgflinewidth,0)--+(0,\paperheight); \end{tikzpicture} \par }{% @hangfrom{#2}{#3}% other section levels using style=chapter }% } \makeatother

\begin{document} \chapter{Poems of Love} \addsec{Title of the poem} This is the first line\ and this the second line of a verse. \bigskip

This is where the common text starts.\\
\blindtext

This is a new block without parskip.
\blindtext
\bigskip

\blindtext
\bigskip

This is the first line\\
and the second of the last verse.

\end{document}

What I would like to achieve is: Chaptertitle instead of chapterprefix Sectiontitle instead of chaptertitle Considering the MWE, something like this:

Poems of Love (instead of "Chapter", green color)

Title of the poem (instead of "Poems of love", black color)

This is the first line ...

However, I tried to replace "chapter" and "chapterlinesformat" by "section" and "sectionlinesformat", but that does not work and gives error messages. I plan to have the actual chaptertitle on a single page and let the chaptertitle appear again above every section. I hope this link with an example works.

PS: I am not tied to scrbook. I've just chosen it because I know it the most due to my theses. I tried memoir class before but was unsatisfied with the layout. So I am open to any suggestions to ease my ideas and appreciate your help.

Lysanne
  • 403
  • 3
  • 16

0 Answers0