1

How can I control the output of headsepline in KOMAscript? I need the line to be broken in the middle Attempt to control the output via

\renewcommand*{\headsepline}{%
  \makebox[\textwidth]{%
  \rule{0.4\textwidth}{0.4pt}%
  \hspace{0.2\textwidth}% пропуск 20%
  \rule{0.4\textwidth}{0.4pt}%
 }%
}

leads to an error, there is no \headsepline command

\documentclass[11pt, open=right, paper=200mm:136mm,%
BCOR=7mm, DIV=14, headinclude=off, footinclude=off]{scrbook}

\AfterCalculatingTypearea{%
  \setlength{\headsep}{1.2em}
}

\KOMAoptions{DIV=last}

\usepackage{polyglossia}             % пакет для української мови
\setmainlanguage{ukrainian}
\hyphenrules{ukrainian}              % ВИПРАВЛЕНН�� ГІФЕНАЦІЇ ДЛЯ УКРАЇНСЬКОЇ

\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage[framemethod=tikz]{mdframed}
\usepackage[final]{microtype}
\usepackage{eso-pic}
\usepackage[normalem]{ulem}
\usepackage{scrlayer-scrpage}
\usepackage{tinos}

\author{Ігор Юхименко}
\title{Подарунок осені}

\makeatletter
  \let\booktitle\@title
  \let\bookauthor\@author
\makeatother


\parindent=1.8em%                        Відступ першого рядку
\clubpenalty=10000%                      Сироти 
\widowpenalty=10000%                     Вдови
\emergencystretch=2pt%                   Розтягування пробілу   


\ModifyLayer[contents={%
  \makebox[\textwidth]{%
    \rule{0.47\textwidth}{0.4pt}%
    \hfill%
    \raisebox{-1ex}{D}%   ← Use dingbat font for special shapes
    \hfill%
    \rule{0.47\textwidth}{0.4pt}%
  }%
}]{scrheadings.head.below.line}

% <===
% ------------ Headers and footer -------------------
% <===

\rehead{\bookauthor}
\lohead{\booktitle}


\renewcommand{\thechapter}{}
\renewcommand{\thesection}{\Roman{section}}

\setcounter{tocdepth}{1}


\renewcommand*{\chapterformat}{\thechapter\enskip}
\renewcommand*{\raggedchapter}{\centering}

\RedeclareSectionCommand[
    beforeskip = 8em plus 1em minus 0.5em,
    afterskip = 0.6em minus 0.1em,
    font = \chafnt\Huge,
    pagestyle = scrplain
]{chapter}


\RedeclareSectionCommand[
%   beforeskip = 8em plus 1em minus 0.5em,
%   afterskip = 1.4em minus 0.4em,
%   pagestyle = empty,
    font = \sectfnt\Large,
    indent = 1.8em
]{section}



\renewcommand*{\paragraph}[1]{\par\vspace{1.2em}
  \begingroup\centering\noindent
  \Large\toprule{K\,K\,K}\par
  \endgroup
  \vspace{0.6em}
  }


\renewcommand*{\chapterlinesformat}[3]{%
  #3
  \noindent\makebox[\linewidth][c]{\smash{\toprule\huge QDQ}}%
}



%==================================================================
%                                                                 |
%                   BEGIN OF DOCUMENT                             |
%                                                                 |
%==================================================================

\begin{document}
Осінь. Чудова пора. Вже не відчувається літня спека. Повітря стає чи-
стішим та прохолоднішим. в цей час найкраще підбивати підсумки того,
що було зроблено за літо. Адже осінь проявляє все, що було зроблено та бу-
ло упущено, коли для цього траплялася найкраща нагода — теплі сонячні
та ясні літні дні.


Як би там не було, але за осінню завжди прийде зима, яка вкриє все
снігом. Тепер всі помилки видні як найкраще. Проте, навіть, якщо ти й
зробив якусь помилку влітку, це — не страшно. Адже в сучасному суспіль-
стві (принаймні мені б хотілося в це вірити) пропасти з голоду практично
неможливо. Завжди знайдуться люди які тебе підтримають й допоможуть.
І якось більш-менш вдасться дотягнути до весни. А там — вже й до літа не-
далеко. І вже однозначно, з’явиться ще одна нагода виправити помилки
допущені минулого року.

\end{document}
4
  • In the classes the line is part of the definition of \@oddhead and \@evenhead in the definition of the page styles and can only be switched on and off. For modified lines or other additional content it is IMHO better to use package scrlayer-scrpage. There you can either redefine an internal command or – and this is IMHO much better – add new layers with additional elements like broken lines. How to use it, is demonstrated, e.g., at sourceforge.net/p/koma-script/wiki-en/… (here to add a background color). Commented Feb 16 at 16:19
  • 1
    BTW: Your code it neither minimal nor complete. So I can neither test it nor use it to show a suggestion in an answer. Commented Feb 16 at 16:23
  • 1
    I've forgotten: As an alternative you could also use \ModifyLayer[contents=…]{scrheadings.head.below.line} to modify the content of the layer used to draw the line. Commented Feb 16 at 16:36
  • @cabohah, \ModifyLayer[contents=…]{scrheadings.head.below.line} work great. Tank's Commented Feb 16 at 18:42

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.