<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to HowTo_ChapterNumberSeparatorInPageHeader</title><link>https://sourceforge.net/p/koma-script/wiki-en/HowTo_ChapterNumberSeparatorInPageHeader/</link><description>Recent changes to HowTo_ChapterNumberSeparatorInPageHeader</description><atom:link href="https://sourceforge.net/p/koma-script/wiki-en/HowTo_ChapterNumberSeparatorInPageHeader/feed" rel="self"/><language>en</language><lastBuildDate>Wed, 02 Jul 2025 08:12:13 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/koma-script/wiki-en/HowTo_ChapterNumberSeparatorInPageHeader/feed" rel="self" type="application/rss+xml"/><item><title>HowTo_ChapterNumberSeparatorInPageHeader modified by Markus Kohm</title><link>https://sourceforge.net/p/koma-script/wiki-en/HowTo_ChapterNumberSeparatorInPageHeader/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="how-to-insert-a-horizontal-bar-colon-or-other-separator-between-the-chapter-number-and-title-in-the-page-header"&gt;How to insert a horizontal bar, colon or other separator between the chapter number and title in the page header&lt;/h1&gt;
&lt;p&gt;The KOMA-Script classes &lt;code&gt;scrbook&lt;/code&gt; and &lt;code&gt;scrreprt&lt;/code&gt; normally set the chapter markers in the head of the page as number + title in the page style &lt;code&gt;headings&lt;/code&gt;. Depending on the setting of the options &lt;code&gt;numbers&lt;/code&gt; and &lt;code&gt;headings&lt;/code&gt; or &lt;code&gt;chapterprefix&lt;/code&gt;, the number can also be terminated with a dot and preceded by ”Chapter“ or ”Appendix“. The &lt;code&gt;\chaptermarkformat&lt;/code&gt; command is responsible for this formatting. This can be easily redefined:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;\documentclass&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;scrbook&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\renewcommand*&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\chaptermarkformat&lt;/span&gt;&lt;span class="nb"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  &lt;span class="k"&gt;\chapappifchapterprefix&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\&lt;/span&gt; &lt;span class="nb"&gt;}&lt;/span&gt;&lt;span class="k"&gt;\thechapter\autodot&lt;/span&gt;&lt;span class="nb"&gt;{}&lt;/span&gt; -- &lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;blindtext&lt;span class="nb"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\begin&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\blinddocument&lt;/span&gt;
&lt;span class="k"&gt;\end&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;for example, sets the header on the left-hand pages as ”&lt;em&gt;1 – Heading on level 0 (chapter)&lt;/em&gt;“. When using the option &lt;code&gt;chapterprefix&lt;/code&gt;:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;\documentclass&lt;/span&gt;&lt;span class="na"&gt;[chapterprefix]&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;scrbook&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\renewcommand*&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\chaptermarkformat&lt;/span&gt;&lt;span class="nb"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  &lt;span class="k"&gt;\chapappifchapterprefix&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\&lt;/span&gt; &lt;span class="nb"&gt;}&lt;/span&gt;&lt;span class="k"&gt;\thechapter\autodot&lt;/span&gt;&lt;span class="nb"&gt;{}&lt;/span&gt; -- &lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;blindtext&lt;span class="nb"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\begin&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\blinddocument&lt;/span&gt;
&lt;span class="k"&gt;\end&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;it automatically becomes ”Chapter 1 – Heading on level 0 (chapter)“. The &lt;code&gt;\chapappifchapterprefix&lt;/code&gt; command is responsible for the dependency on the &lt;code&gt;chapterprefix&lt;/code&gt; option (or &lt;code&gt;headings=chapterprefix&lt;/code&gt;). It also ensures that ”Appendix“ is automatically used in the appendix instead of ”Chapter“.&lt;/p&gt;
&lt;p&gt;To use a colon (followed by a space) instead of a horizontal bar (framed by spaces), change the definition of &lt;code&gt;\chaptermarkformat&lt;/code&gt; as follows:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;\documentclass&lt;/span&gt;&lt;span class="na"&gt;[chapterprefix]&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;scrbook&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\renewcommand*&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\chaptermarkformat&lt;/span&gt;&lt;span class="nb"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  &lt;span class="k"&gt;\chapappifchapterprefix&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\&lt;/span&gt; &lt;span class="nb"&gt;}&lt;/span&gt;&lt;span class="k"&gt;\thechapter\autodot:&lt;/span&gt; &lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;blindtext&lt;span class="nb"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\begin&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\blinddocument&lt;/span&gt;
&lt;span class="k"&gt;\end&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can also insert a prefix only at this point if you want to have the chapter headings themselves without a prefix. To do this, replace the &lt;code&gt;\chapappifchapterprefix{\ }&lt;/code&gt; with &lt;code&gt;\chapapp\&lt;/code&gt;:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;\documentclass&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;scrbook&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\renewcommand*&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\chaptermarkformat&lt;/span&gt;&lt;span class="nb"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  &lt;span class="k"&gt;\chapapp\&lt;/span&gt; &lt;span class="k"&gt;\thechapter\autodot\&lt;/span&gt; --&lt;span class="k"&gt;\&lt;/span&gt; &lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;blindtext&lt;span class="nb"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\begin&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\blinddocument&lt;/span&gt;
&lt;span class="k"&gt;\end&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can of course proceed in a similar way if you do not want the dot at this point due to the colon despite the setting &lt;code&gt;numbers=withenddot&lt;/code&gt;. You then simply remove &lt;code&gt;\autodot&lt;/code&gt;:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;\documentclass&lt;/span&gt;&lt;span class="na"&gt;[numbers=withenddot]&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;scrbook&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\renewcommand*&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\chaptermarkformat&lt;/span&gt;&lt;span class="nb"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  &lt;span class="k"&gt;\chapapp\&lt;/span&gt; &lt;span class="k"&gt;\thechapter\&lt;/span&gt; --&lt;span class="k"&gt;\&lt;/span&gt; &lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;blindtext&lt;span class="nb"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\begin&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\blinddocument&lt;/span&gt;
&lt;span class="k"&gt;\end&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Markus Kohm</dc:creator><pubDate>Wed, 02 Jul 2025 08:12:13 -0000</pubDate><guid>https://sourceforge.net800ff52d2379f5bf740e52346f4c158e3c15651b</guid></item></channel></rss>