summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/doc/english/common-pagestylemanipulation.tex
blob: 3814320ed6912853ab1deeda32591650f287cfdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
% ======================================================================
% common-pagestylemanipulation.tex
% Copyright (c) Markus Kohm, 2013-2019
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, version 1.3c of the license.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX 
% version 2005/12/01 or later and of this work.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in manifest.txt.
% ----------------------------------------------------------------------
% common-pagestylemanipulation.tex
% Copyright (c) Markus Kohm, 2013-2019
%
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
% Version 1.3c, verteilt und/oder veraendert werden.
% Die neuste Version dieser Lizenz ist
%   http://www.latex-project.org/lppl.txt
% und Version 1.3c ist Teil aller Verteilungen von LaTeX
% Version 2005/12/01 oder spaeter und dieses Werks.
%
% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
% (allein durch den Autor verwaltet).
%
% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
% 
% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
% ======================================================================
%
% Text that is common for several chapters of the KOMA-Script guide
% Maintained by Markus Kohm
%
% ----------------------------------------------------------------------
%
% Absaetze, die mehreren Kapitels in der KOMA-Script-Anleitung gemeinsam sind
% Verwaltet von Markus Kohm
%
% ============================================================================

\KOMAProvidesFile{common-pagestylemanipulation.tex}
                 [$Date: 2018-02-05 01:50:56 -0800 (Mon, 05 Feb 2018) $
                  KOMA-Script guide (common paragraph: 
                                     Setting up defined page styles)]
\translator{Markus Kohm\and Jana Schubert\and Karl Hagen}

% Date version of the translated file: 2019-10-09

\section{Manipulating Page Styles}
\seclabel{pagestyle.content}
\BeginIndexGroup
\BeginIndex{}{page>style}

\IfThisCommonLabelBase{scrlayer}{%
  Although \Package{scrlayer} itself does not define concrete page styles with
  content\,---\,the previously mentioned page styles
  \DescRef{\LabelBase.pagestyle.@everystyle@} and \PageStyle{empty} are
  initially defined without any layers, i.\,e., without content\,---\,, the
  package provides some options and commands to manipulate their contents.%
}{%
  \IfThisCommonLabelBase{scrlayer-scrpage}{%
    \autoref{sec:scrlayer-scrpage.predefined.pagestyles} explains how the page
    styles \DescRef{\LabelBase.pagestyle.scrheadings} and
    \DescRef{\LabelBase.pagestyle.plain.scrheadings} are defined and how these
    defaults can be changed. But topics such as creating running headers,
    changing the widths of the header and footer, and putting horizontal lines
    above or below the header or footer have yet to be described. Although
    these capabilities are actually part of the
    \hyperref[cha:scrlayer]{\Package{scrlayer}}%
    \important{\hyperref[cha:scrlayer]{\Package{scrlayer}}} package, they will
    be explained below because these basic features of
    \hyperref[cha:scrlayer]{\Package{scrlayer}} make up an important part of
    \IfThisCommonLabelBase{scrlayer-scrpage}{\Package{scrlayer-scrpage}%
    }{%
      \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}%
    }.%
  }{%
    \IfThisCommonLabelBase{scrlayer-scrpage-experts}{%
      This section is a supplement to
      \autoref{sec:scrlayer.pagestyle.content}. It describes features that may
      be too complicated for beginners.%
    }{\InternalCommonFileUsageError}%
  }%
}

\IfThisCommonLabelBase{scrlayer-scrpage-experts}{\iffalse}{%
  \csname iftrue\endcsname}%
  \begin{Declaration}
    \Macro{automark}\OParameter{section level of the right mark}
                    \Parameter{section level of the left mark}
    \Macro{automark*}\OParameter{section level of the right mark}
                    \Parameter{section level of the left mark}
    \Macro{manualmark}
  \end{Declaration}
  \IfThisCommonLabelBase{scrlayer-scrpage}{%
    \begin{Explain}
      In both the standard \LaTeX{} classes and the \KOMAScript{} classes, the
      decision of whether to use automatic or static running
      heads\Index{running heads>automatic}\Index{running heads>static} is made
      by using the appropriate page style. Running heads repeat some
      descriptive text, such as a title, that is appropriate to the page or
      column, usually in the header, more rarely in the footer. As already
      explained in
      \autoref{sec:maincls.pagestyle}, you get automatic running heads with
      \DescRef{maincls.pagestyle.headings}\IndexPagestyle{headings}%
      \important{\DescRef{maincls.pagestyle.headings}}
      
      In the article classes\OnlyAt{\Class{article}\and \Class{scrartcl}}
      \Class{article} or \hyperref[cha:maincls]{\Class{scrartcl}}, the
      \PageStyle{headings}\IndexPagestyle{headings} page style uses the
      section heading, which is either the mandatory or the optional argument
      of \DescRef{maincls.cmd.section}, for the running head%
      \textnote{automatic running head} of one-sided documents. Two-sided
      documents use this section heading as the \emph{left mark} and the
      subsection heading as the \emph{right mark}. The left mark is printed,
      as the name indicates, on left-hand (verso) pages. The right mark is
      printed on right-hand (recto)\,---\,in one-sided printing this means on
      all\,---\,pages. The classes by default also delete the right mark
      whenever they put the section heading into the left mark.

      The report and book classes \OnlyAt{\Class{report}\and 
      	\Class{scrreprt}\and \Class{book}\and \Class{scrbook}} start one level
      higher. Thus they use the chapter heading as the right mark in one-sided
      printing. In two-sided printing, the chapter heading is the left mark
      and the section heading is the right mark.

      If you use \DescRef{maincls.pagestyle.myheadings}%
      \IndexPagestyle{myheadings}%
      \important{\DescRef{maincls.pagestyle.myheadings}}\textnote{manual
      	running head}, the marks in the page header still exist, and the page
      numbers are placed in the same way, but section commands no longer set
      the marks automatically. You can set them manually\important{%
      	\DescRef{\ThisCommonLabelBase.cmd.markright}\\
      	\DescRef{\ThisCommonLabelBase.cmd.markboth}} using the commands
      \DescRef{\ThisCommonLabelBase.cmd.markright} and
      \DescRef{\ThisCommonLabelBase.cmd.markboth}, which are described later
      in this section.
    \end{Explain}\par
  }{%
    \IfThisCommonLabelBase{scrlayer}{%
      For most classes, the choice of a page style\,---\,generally
      \PageStyle{headings} or \PageStyle{myheading}\,---\,determines whether
      the running heads are created automatically or manually. %
    }{\InternalCommonFileUsageError}%
  }%
  This distinction has been eliminated by %
  \iffalse \Package{scrpage2} and now also by \fi%
  \hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer}. Instead
  of distinguishing between automatic\textnote{automatic and manual running
    heads} and manual running heads by which page style is selected, there are
  two new commands: \Macro{automark} and \Macro{manualmark}.

  The \Macro{manualmark}\important{\Macro{manualmark}} command switches to
  manual marks and deactivates the automatic filling of the marks. In contrast,
  \Macro{automark}\important{\Macro{automark}} and \Macro{automark*} define
  which section levels should be used to set the mark automatically. The
  optional argument is the \PName{section level of the right mark}, the
  mandatory argument the \PName{section level of the left mark}. The
  arguments should always be the name of a section level like
  \PValue{part}, \PValue{chapter}, \PValue{section}, \PValue{subsection},
  \PValue{subsubsection}, \PValue{paragraph}, or \PValue{subparagraph}.

  Normally, the higher level should be used for the left mark and the lower
  level for the right mark. This is only a convention and not a requirement,
  but it makes sense.

  Please note\textnote{Attention!} that not every class provides running heads
  for every section level. For example, the standard classes\textnote{%
  	\KOMAScript{} vs. standard classes} never use \DescRef{maincls.cmd.part}
  in the heading. The \KOMAScript{} classes, on the other hand, support all
  levels.

  The difference between \Macro{automark} and \Macro{automark*}%
  \important{\Macro{automark*}} is that \Macro{automark} overrides all
  previous commands to automatically set the mark, while \Macro{automark*}
  changes only the behaviour of the section levels specified in its
  arguments.%
  \IfThisCommonLabelBase{scrlayer-scrpage}{}{ With this feature you can handle
    relatively complex cases.}% Umbruchoptimierung
  \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{\csname
    iffalse\endcsname}%
    \iffalse% Umbruchkorrekturtext
      \iffree{}{\par
        The obsolete package
        \Package{scrpage2}\IndexPackage{scrpage2}\important{\Package{scrpage2}}
        understands both \Macro{manualmark} and \Macro{automark}, but not
        \Macro{automark*}. Therefore the following examples are not completely
        transferable when using \Package{scrpage2}.%
      }%
    \fi
    %
    \begin{Example}
      \phantomsection\xmpllabel{mark}%
      Suppose you want chapter headings to be used as the running head of even
      pages and the section heading to be the running head of odd pages, as
      usual. But on odd pages you also want the chapter headings to be used as
      the running head until the first section appears. To do so, you first
      have to load \IfThisCommonLabelBase{scrlayer-scrpage}{%
      	\Package{scrlayer-scrpage}%
      }{%
      	\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}
      and select the \DescRef{\LabelBase.pagestyle.scrheadings} page style,
      so the document starts with:
\begin{lstcode}
  \documentclass{scrbook}
  \usepackage{scrlayer-scrpage}
  \pagestyle{scrheadings}
\end{lstcode}
      Next, ensure that the chapter headings set both the left and the right
      marks:
\begin{lstcode}
  \automark[chapter]{chapter}
\end{lstcode}
      Then the section heading should also set right marks:
\begin{lstcode}
   \automark*[section]{}
\end{lstcode}
      Here the starred version is used, since the previous \Macro{automark}
      command should remain in effect. Additionally, the mandatory argument
      for the \PName{section level of the left mark} is empty because this
      mark should remain unchanged.

      All that's missing now is a bit of document content to show the result:
\begin{lstcode}
  \usepackage{lipsum}
  \begin{document}
  \chapter{Chapter Heading}
  \lipsum[1-20]
  \section{Section Heading}
  \lipsum[21-40]
  \end{document}
\end{lstcode}
      We use the extremely useful \Package{lipsum}\IndexPackage{lipsum} 
      package to generate some dummy text with command 
      \Macro{lipsum}\IndexCmd{lipsum}.

      If you test the example, you will see that the first page of the chapter 
      appears, as usual, without a running head, since this page automatically 
      uses the \PageStyle{plain} page style
      \DescRef{\LabelBase.pagestyle.plain.scrheadings} (see the
      \DescRef{maincls.cmd.chapterpagestyle} on
      \DescPageRef{maincls.cmd.chapterpagestyle}). Pages~2--4 have the
      chapter headings in the running head. After the section heading on
      page~4, the running head of page~5 changes to this section heading. From
      this page to the end, the running head alternates from page to page
      between the chapter and section headings.%
    \end{Example}
  \fi

  \begin{Declaration}
	\Option{automark}
	\OptionVName{autooneside}{simple switch}
	\Option{manualmark}
  \end{Declaration}
  Instead of the commands described previously, you can also use the
  \Option{manualmark}\important{\Option{manualmark}\\\Option{automark}} and
  \Option{automark} options to switch between automatic and manual running
  heads. \Option{automark} always uses the default\textnote{default}
  \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{\csname
    iffalse\endcsname}%
    \lstinline|\automark[section]{chapter}| for classes with 
    \DescRef{maincls.cmd.chapter} and
    \lstinline|\automark[subsection]{section}| for other classes.
  \else
\begin{lstcode}
  \automark[section]{chapter}
\end{lstcode}
    for classes with \DescRef{maincls.cmd.chapter} and
\begin{lstcode}
  \automark[subsection]{section}
\end{lstcode}
    for other classes.
  \fi

  \IfThisCommonLabelBase{scrlayer-scrpage}{%
    In one-sided printing, you normally want only the higher section levels
    to provide the running title.%
  }{%
    In one-sided printing, you normally do not want the lower section level
    to influence the right mark. Instead, you want the higher section
    level, which would appear in only the left mark in two-sided printing, to
    be the running head of all pages.%
  } The default option \Option{autooneside}\important{\Option{autooneside}}
  corresponds to this behaviour. The option accepts the values for 
  simple switches listed in \autoref{tab:truefalseswitch},
  \autopageref{tab:truefalseswitch}. If you deactivate this option, the 
  optional and mandatory arguments of \Macro{automark} and \Macro{automark*}
  will again control the running head in one-sided printing.%
  \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{\csname
    iffalse\endcsname}%
    \begin{Example}
      \phantomsection\xmpllabel{mark.oneside}%
      Suppose you have a one-sided report but want running heads similar to
      those in the previous book example. Specifically, the chapter headings 
      should be used as the running head until the first section appears. 
      From the then on, the section heading should be used. So we modify the
      previous example a little bit:
\begin{lstcode}
  \documentclass{scrreprt}
  \usepackage[autooneside=false]{scrlayer-scrpage}
  \pagestyle{scrheadings}
  \automark[section]{chapter}
  \usepackage{lipsum}
  \begin{document}
  \chapter{Chapter Heading}
  \lipsum[1-20]
  \section{Section Heading}
  \lipsum[21-40]
  \end{document}
\end{lstcode}
      As you can see an \DescRef{\LabelBase.cmd.automark*} command is not
      required in this case. You should try the example with
      \Option{autooneside} set to \PValue{true}, or remove the option, for
      comparison. You will notice a difference in the running head from
      page~4 on.
    \end{Example}
  \fi

  Note\textnote{Attention!} that merely loading the package does not have any
  effect on whether automatic or manual running heads are used, or what kind
  of sectioning headings fill the marks. Only by explicitly using the option
  \Option{automark} or \Option{manualmark}, or the command
  \DescRef{\LabelBase.cmd.automark} or \DescRef{\LabelBase.cmd.manualmark},
  will the conditions here be initialized.%
  \IfThisCommonLabelBase{scrlayer-scrpage}{\par%
    You can find additional background information and examples of how to use
    these commands in the documentation for the \Package{scrlayer} package
    \IfThisCommonLabelBase{scrlayer-scrpage}{%
      \Package{scrlayer-scrpage}%
    }{%
      \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}%
    } in \autoref{sec:scrlayer-scrpage.pagestyle.content}, starting on
    \DescPageRef{scrlayer-scrpage.cmd.manualmark}.%
  }{}%
  \EndIndexGroup
  \EndIndexGroup


  \begin{Declaration}
    \OptionVName{draft}{simple switch}
  \end{Declaration}
  This \KOMAScript{} option accepts the values for simple switches
  listed in \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}.
  If this option is active, all elements of the page styles will also show
  rulers\index{ruler}%
  \IfThisCommonLabelBase{scrlayer}{ for}{%
  	. This can sometimes be useful during}
   the drafting process.%
  \IfThisCommonLabelBase{scrlayer-scrpage}{ %
    If this option has been set globally (see the optional argument
    of \DescRef{\LabelBase.cmd.documentclass}) but you do not want the
    rulers, you can deactivate them for this package alone by using
    \OptionValue{draft}{false} as an optional argument of
    \DescRef{\LabelBase.cmd.usepackage} while loading the package.%
  }{}%
  \EndIndexGroup

  \begin{Declaration}
    \Macro{MakeMarkcase}\Parameter{text}
  \end{Declaration}
  Automatic running heads, but not manual ones, use \Macro{MakeMarkcase} for 
  their output. If the command has not been defined, e.\,g., by the class
  while loading \IfThisCommonLabelBase{scrlayer}{%
    \Package{scrlayer}%
  }{%
    \hyperref[cha:scrlayer]{\Package{scrlayer}}%
  }, it is defined by default to output the argument \PName{text} without
  changes. But the default can be changed either by redefining 
  \Macro{MakeMarkcase} or by using the \DescRef{\LabelBase.option.markcase}%
  \IndexOption{markcase}\important{\DescRef{\LabelBase.option.markcase}}
  option, which will be described next. Depending on the setting, the
  argument can, e.\,g., be converted into upper or lower case.% 
  \EndIndexGroup


  \begin{Declaration}
    \OptionVName{markcase}{value}
  \end{Declaration}
  As explained earlier, with \IfThisCommonLabelBase{scrlayer}{%
    \Package{scrlayer}%
  }{%
    \hyperref[cha:scrlayer]{\Package{scrlayer}}%
  } you can choose between manual and automatic running heads. Using automatic
  running heads, the corresponding marks are set using the section heading
  commands. In some cultures, in contrast to the typography of German-speaking
  countries, it is common practice to set the running heads in upper-case
  letters. The \LaTeX{} standard classes do so by default. The 
  \IfThisCommonLabelBase{scrlayer}{%
    \Package{scrlayer}%
  }{%
    \hyperref[cha:scrlayer]{\Package{scrlayer}}%
  } package also offers this as an option. To do so, use the
  \OptionValue{markcase}{upper}\important{\OptionValue{markcase}{upper}}%
  \IndexOption[indexmain]{markcase~=upper} option, which redefines
  \DescRef{scrlayer.cmd.MakeMarkcase}\IndexCmd[indexmain]{MakeMarkcase}.

  \IfThisCommonLabelBase{scrlayer}{%
    Because of the poor typographical quality of the primitive capitalisation
    routine (see the explanation of \DescRef{scrlayer-scrpage.option.markcase}
    in \autoref{sec:scrlayer-scrpage.pagestyle.content},
    \autopageref{expl:scrlayer-scrpage.MakeUppercase}) the author of
    \KOMAScript recommends that you avoid upper-case typesetting for running
    heads.%
  }{%
    Unfortunately,\phantomsection\label{expl:\ThisCommonLabelBase.MakeUppercase}
    the \LaTeX{} command for converting text to upper case\Index{upper case},
    \Macro{MakeUppercase}\IndexCmd{MakeUppercase}, does not produce good
    results because it neither spaces characters nor balances lines
    appropriately. This is certainly in part due to the fact that a
    typographically correct upper-case conversion requires analysing the
    glyphs to account for the different letter shapes \iffree{and their
      combinations}{} while balancing the block. I therefore recommend that
    you avoid upper-case typesetting for running heads.%
  } This is usually possible with \OptionValue{markcase}{used}\important{%
    \OptionValue{markcase}{used}}\IndexOption[indexmain]{markcase~=used}.
  However, some classes insert \Macro{MarkUppercase}, or even the \TeX{}
  command \Macro{uppercase}, into the running heads. For such cases, you can
  use the option \OptionValue{markcase}{noupper}%
  \important{\OptionValue{markcase}{noupper}}%
  \IndexOption[indexmain]{markcase~=noupper}. This will also deactivate
  \Macro{MakeUppercase} and \Macro{uppercase} inside the running heads.

  You can find all valid values for \Option{markcase} in
  \autoref{tab:scrlayer-scrpage.markcase}%
  \IfThisCommonLabelBase{scrlayer-scrpage}{}{,
    \autopageref{tab:scrlayer-scrpage.markcase}}.%
  \IfThisCommonLabelBase{scrlayer-scrpage}{%
    \begin{table}
      \centering
      \caption[Available values for the \Option{markcase} option]{Available
        values for the \Option{markcase} option to select upper/lower case
        typesetting in automatic running heads}%
      \label{tab:\ThisCommonLabelBase.markcase}%
      \begin{desctabular}
        \pventry{lower}{\IndexOption[indexmain]{markcase~=lower}%
          redefines \DescRef{\LabelBase.cmd.MakeMarkcase} to convert the
          automatic running heads into lower-case letters using
          \Macro{MakeLowercase} (lower case typesetting).%
        }%
        \pventry{upper}{\IndexOption[indexmain]{markcase~=upper}%
          redefines \DescRef{\LabelBase.cmd.MakeMarkcase} to convert the
          automatic running heads into upper-case letters using
          \Macro{MakeUppercase} (upper case typesetting).%
        }%
        \pventry{used}{\IndexOption[indexmain]{markcase~=used}%
          redefines \DescRef{\LabelBase.cmd.MakeMarkcase} to use automatic
          running heads without any case changes.%
        }%
        \entry{\PValue{ignoreuppercase}, \PValue{nouppercase},
          \PValue{ignoreupper},
          \PValue{noupper}}{\IndexOption[indexmain]{markcase~=noupper}%
          redefines not only \DescRef{\LabelBase.cmd.MakeMarkcase} but also
          \Macro{MakeUppercase} and \Macro{uppercase} locally to the running
          heads to leave the automatic running heads unchanged.%
        }%
      \end{desctabular}
    \end{table}
  }{}%
  \EndIndexGroup


  \begin{Declaration}
    \Macro{leftmark}
    \Macro{rightmark}
    \Macro{headmark}
    \Macro{pagemark}
  \end{Declaration}
  If you want to depart from the predefined page styles, you typically need to
  decide where to place the marks' contents. With 
  \Macro{leftmark}\important{\Macro{leftmark}} you can define what will
  appear in the left mark when the page is output.

  Similarly, you can use \Macro{rightmark}\important{\Macro{rightmark}} to 
  define the contents of the right mark.\iffree{}{ For information about some
  subtleties when using these commands, see further 
  \DescRef{maincls-experts.cmd.rightmark} in
  \autoref{sec:maincls-experts.addInfos},
  \DescPageRef{maincls-experts.cmd.rightmark}.}

  You can make life easier with \Macro{headmark}\important{\Macro{headmark}}. 
  This extension of \IfThisCommonLabelBase{scrlayer}{%
    \Package{scrlayer}%
  }{%
    \hyperref[cha:scrlayer]{\Package{scrlayer}}%
  } is a shorthand that resolves to either \Macro{leftmark} or
  \Macro{rightmark} depending on whether the current page is even or odd.

  The \Macro{pagemark}\important{\Macro{pagemark}} command has nothing to do
  with \TeX's mark mechanism. It is serves to output a formatted page number.
  \BeginIndex{FontElement}{pagenumber}\LabelFontElement{pagenumber}%
  The font of element
  \FontElement{pagenumber}\important{\FontElement{pagenumber}} will be used
  for the output. This can be changed using the \Macro{setkomafont} or
  \DescRef{maincls.cmd.addtokomafont} commands (see also
  \autoref{sec:maincls.textmarkup}, \DescPageRef{maincls.cmd.setkomafont}).%
  \EndIndex{FontElement}{pagenumber}%
  \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{%
    \par %
    If you are interested in an example showing the usage of the
    \Macro{headmark} and \Macro{pagemark} commands, see
    \autoref{sec:scrlayer-scrpage.pagestyle.content},
    \PageRefxmpl{scrlayer-scrpage.cmd.headmark}. Internally, the
    \IfThisCommonLabelBase{scrlayer-scrpage}{%
    	\Package{scrlayer-scrpage}%
    }{%
    	\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}%
    } package uses many such features of
    \IfThisCommonLabelBase{scrlayer-scrpage}{%
    	\hyperref[cha:scrlayer]{\Package{scrlayer}}%
    }{%
    	\Package{scrlayer}%
    }.%
    \csname iffalse\endcsname}%
    \begin{Example}
      \phantomsection\xmpllabel{cmd.headmark}%
      Suppose you want the running head to be aligned to the left margin and 
      the page number to the right margin in one-sided printing. The following
      minimal working example does just this:
\begin{lstcode}
  \documentclass{scrreprt}
  \usepackage{blindtext}
  \usepackage[automark]{scrlayer-scrpage}
  \pagestyle{scrheadings}
  \ihead{\headmark}
  \ohead*{\pagemark}
  \chead{}
  \cfoot[]{}
  \begin{document}
  \blinddocument
  \end{document}
\end{lstcode}
      The \Package{blindtext}\IndexPackage{blindtext} package and its
      \Macro{blinddocument}\IndexCmd{blinddocument} command have been used
      here to quickly generate sample document content for the example.

      The \DescRef{scrlayer-scrpage.cmd.ihead}\IndexCmd{ihead} and
      \DescRef{scrlayer-scrpage.cmd.ohead*}\IndexCmd{ohead*} commands
      configure the desired marks. The starred variant 
      \DescRef{scrlayer-scrpage.cmd.ohead*} %
      \iffalse% Umbruchvarianten
        configures the page number mark not only on the pages set with the
        \DescRef{\LabelBase.pagestyle.scrheadings}%
        \IndexPagestyle{scrheadings} page style but also those set
        with the \PageStyle{plain} %
      \else%
        also configures the page number with the %
      \fi%
      \DescRef{\LabelBase.pagestyle.plain.scrheadings}%
      \IndexPagestyle{plain.scrheadings} page style used on the first page of
      a chapter.%

      Because these page styles have predefined marks in the centre of the
      header and footer, those elements are cleared by using
      \DescRef{scrlayer-scrpage.cmd.chead} and
      \DescRef{scrlayer-scrpage.cmd.cfoot} with empty arguments. Alternatively
      you could use
      \DescRef{scrlayer-scrpage-experts.cmd.clearpairofpagestyles}
      \IndexCmd{clearpairofpagestyles} \emph{before}
      \DescRef{scrlayer-scrpage.cmd.ihead}. You will find this command
      described in \autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs}.
    \end{Example}

    Please note\textnote{Attention!} that the empty optional argument of
    \DescRef{scrlayer-scrpage.cmd.cfoot} in the example above is not the same
    as omitting the optional argument. You should try it yourself and have a 
    look at the difference in the footer of the first page.%
  \fi

  \IfThisCommonLabelBase{scrlayer-scrpage}{% Umbruchvarianten
    Advanced users can find more mark-setting commands%
  }{%
    If the options for the marks described above are not sufficient,
    additional commands for advanced users are documented%
  } %
  starting on \IfThisCommonLabelBase{scrlayer-scrpage}{%
    \DescPageRef{scrlayer-scrpage-experts.cmd.righttopmark}}{%
    \DescPageRef{\ThisCommonLabelBase.cmd.righttopmark}}.%
  \iffalse% Umbruchkorrektur
    \ For example, there you can find
    \DescRef{scrlayer-scrpage-experts.cmd.leftfirstmark} and
    \DescRef{scrlayer-scrpage-experts.cmd.rightbotmark}, which are quite useful
    for documents like lexicons.%
  \fi%
  \EndIndexGroup


  \begin{Declaration}
    \Macro{partmarkformat}%
    \Macro{chaptermarkformat}%
    \Macro{sectionmarkformat}%
    \Macro{subsectionmarkformat}%
    \Macro{subsubsectionmarkformat}%
    \Macro{paragraphmarkformat}%
    \Macro{subparagraphmarkformat}
  \end{Declaration}
  \KOMAScript{} classes and the \IfThisCommonLabelBase{scrlayer}{%
    \Package{scrlayer}%
  }{%
    \hyperref[cha:scrlayer]{\Package{scrlayer}}%
  } package typically use these commands internally to format the section
  numbers. They also support the \DescRef{maincls.cmd.autodot} mechanism of
  the \KOMAScript{} classes. If desired, these commands can be redefined to 
  achieve a different formatting of section numbers.%
  \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{%
    \ See the example in \autoref{sec:scrlayer-scrpage.pagestyle.content},
    \PageRefxmpl{scrlayer-scrpage.cmd.sectionmarkformat} for more
    information.%
    \csname iffalse\endcsname%
  }%
    \begin{Example}
      \phantomsection\xmpllabel{cmd.sectionmarkformat}%
      \iftrue
        For example, if you want to have running heads without a section
        number, this is how you do it:
      \else
        Suppose you want section headings without the section number to appear
        in the running head. This can be accomplished easily with the
        following:
      \fi
\begin{lstcode}[belowskip=-\dp\strutbox]
  \renewcommand*{\sectionmarkformat}{}
\end{lstcode}
    \end{Example}
  \fi% 
  \EndIndexGroup


  \begin{Declaration}
    \Macro{partmark}\Parameter{Text}%
    \Macro{chaptermark}\Parameter{Text}%
    \Macro{sectionmark}\Parameter{Text}%
    \Macro{subsectionmark}\Parameter{Text}%
    \Macro{subsubsectionmark}\Parameter{Text}%
    \Macro{paragraphmark}\Parameter{Text}%
    \Macro{subparagraphmark}\Parameter{Text}
  \end{Declaration}
  Most classes use these commands internally to set the marks according to the 
  sectioning commands. The argument should contain the text without the number 
  of the sectioning unit. The number is automatically determined using the 
  current section level if you use numbered headings.

  However\textnote{Attention!}, not all classes use such a command for
  every section level. The standard classes\textnote{\KOMAScript{} vs. 
    standard classes}, for example, do not call \Macro{partmark}
  \IfThisCommonLabelBase{scrlayer-scrpage}{%
    upon a \Macro{part} command}{%
    , whereas the \KOMAScript{} classes naturally support \Macro{partmark} as
    well}.
  
  If you redefine these commands, be sure\textnote{Attention!} to check
  whether the numbers will be output via the
  \DescRef{maincls.counter.secnumdepth} before setting the number even if you
  do not change the \DescRef{maincls.counter.secnumdepth} counter yourself,
  because packages and classes may do so locally and rely on correct handling
  of \DescRef{maincls.counter.secnumdepth}.

  The \IfThisCommonLabelBase{scrlayer}{%
    \Package{scrlayer}%
  }{%
    \hyperref[cha:scrlayer]{\Package{scrlayer}}%
  } package also redefines these commands whenever you use
  \DescRef{scrlayer.cmd.automark} or \DescRef{scrlayer.cmd.manualmark} or the
  corresponding options, to activate or deactivate the desired running heads.%
  \EndIndexGroup


  \begin{Declaration}
    \Macro{markleft}\Parameter{left mark}%
    \Macro{markright}\Parameter{right mark}%
    \Macro{markboth}\Parameter{left mark}\Parameter{right mark}
  \end{Declaration}
  Regardless of whether you are working with manual or automatic running 
  heads, you can always change the contents of the \PName{left mark} or the
  \PName{right mark} using these commands. Note that the left-hand mark
  resulting from \Macro{leftmark}\IndexCmd{leftmark}%
  \important{\Macro{leftmark}} will be the last mark placed on the
  corresponding page, while the right-hand mark resulting from
  \Macro{rightmark}\IndexCmd{rightmark}\important{\Macro{rightmark}} is the
  first mark placed on the corresponding page. For more details, see
  \iffree{}{the additional explanation of
    \DescRef{maincls-experts.cmd.rightmark} in
    \autoref{sec:maincls-experts.addInfos},
    \DescPageRef{maincls-experts.cmd.rightmark} or} to
  \DescRef{scrlayer.cmd.rightfirstmark}\IfThisCommonLabelBase{scrlayer}{}{ in
  	\autoref{sec:scrlayer.pagestyle.content}},
  \DescPageRef{scrlayer.cmd.rightfirstmark}.

  If you are using manual running heads\Index{running head>manual}, the marks
  remain valid until they are explicitly replaced by reusing the corresponding
  commands. However, if you are using automatic running heads, the marks can
  become invalid with the next section heading, depending on the automatic
  configuration.

  You can also use these commands in conjunction with the starred versions of 
  the sectioning commands.%
  \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{%
    \ You can find detailed examples illustrating usage of \Macro{markboth} 
    with the \IfThisCommonLabelBase{scrlayer-scrpage}{%
    	\hyperref[cha:scrlayer]{\Package{scrlayer}}%
    }{%
    	\Package{scrlayer}%
    }-derived package \IfThisCommonLabelBase{scrlayer-scrpage}{%
    	\Package{scrlayer-scrpage}%
    }{%
    	\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}%
    } in
    \autoref{sec:scrlayer-scrpage.pagestyle.content},
    \PageRefxmpl{scrlayer-scrpage.cmd.markboth}.%
    \csname iffalse\endcsname%
  }%
    \begin{Example}
      \phantomsection\xmpllabel{cmd.markboth}%
      Suppose you write a preface of several pages placed just before the 
      table of contents but not appearing in it. However, since you use 
      dividing lines in your header, you want a running head for this preface:
\begin{lstcode}
  \documentclass[headsepline]{book}
  \usepackage{scrlayer-scrpage}
  \pagestyle{scrheadings}
  \usepackage{blindtext}
  \begin{document}
  \chapter*{Preface}
  \markboth{Preface}{Preface}
  \blindtext[20]
  \tableofcontents
  \blinddocument
  \end{document}
\end{lstcode}
      At first glance, this seems to produce the desired result. Taking a
      second look, however, you can see that the running title 
      ``\texttt{Preface}'' does not appear in upper-case letters, unlike the 
      other running heads. But that's easy to change:
\begin{lstcode}
  \documentclass[headsepline]{book}
  \usepackage{scrlayer-scrpage}
  \pagestyle{scrheadings}
  \usepackage{blindtext}
  \begin{document}
  \chapter*{Preface}
  \markboth{\MakeMarkcase{Preface}}{\MakeMarkcase{Preface}}
  \blindtext[20]
  \tableofcontents
  \blinddocument
  \end{document}
\end{lstcode}
      Using command \DescRef{\LabelBase.cmd.MakeMarkcase} results in getting
      the same letter case as for automatic running heads.

      Now, let's move the \DescRef{maincls.cmd.tableofcontents} in front
      of the preface and remove the \Macro{markboth} command. You'll
      discover that the preface now has the running head
      ``\texttt{CONTENTS}''. This is due to a quirk of
      \DescRef{maincls.cmd.chapter*} (see also \autoref{sec:maincls.structure}
      on \DescPageRef{maincls.cmd.chapter*}). If you do not want a running
      head here, you can easily accomplish this by passing two empty arguments 
      to \Macro{markboth}:
\begin{lstcode}
  \documentclass[headsepline]{book}
  \usepackage{scrlayer-scrpage}
  \pagestyle{scrheadings}
  \usepackage{blindtext}
  \begin{document}
  \tableofcontents
  \chapter*{Preface}
  \markboth{}{}
  \blindtext[20]
  \blinddocument
  \end{document}
\end{lstcode}
    \end{Example}
  \fi% 
  \EndIndexGroup
\fi


\IfThisCommonLabelBase{scrlayer-scrpage}{\iffalse}{\csname iftrue\endcsname}
  \begin{Declaration}
    \Macro{GenericMarkFormat}\Parameter{name of the section level}
  \end{Declaration}
  By default, this command is used to format all section numbers in running 
  heads below the subsection level, and for classes without
  \DescRef{maincls.cmd.chapter}, also for the section and subsection levels,
  unless the respective mark commands for those levels are defined before
  loading \Package{scrlayer}. The command causes the package to use
  \Macro{@seccntmarkformat}\IndexCmd{@seccntmarkformat}%
  \important{\Macro{@seccntmarkformat}} if this internal command is defined,
  as it is in the \KOMAScript{} classes. Otherwise \Macro{@seccntformat}%
  \IndexCmd{@seccntformat}\important{\Macro{@seccntformat}} will be used,
  which is provided by the \LaTeX{} kernel. The mandatory argument of the
  command contains the name of a sectioning command, such as \PValue{chapter}
  or \PValue{section} \emph{without} the backslash prefix.

  By redefining this command, you can change the default number format for all
  sectioning commands that use it. Classes can also change the default
  formatting also by defining this command.%
  \IfThisCommonLabelBase{scrlayer-scrpage-experts}{\iftrue}{%
    \par %
    A detailed example illustrating the interplay of the 
    \Macro{GenericMarkFormat} command with the 
    \DescPageRef{\ThisCommonLabelBase.cmd.chaptermark} command and
    \DescRef{\ThisCommonLabelBase.cmd.sectionmarkformat} or
    \DescRef{\ThisCommonLabelBase.cmd.subsectionmarkformat} when using
    the \IfThisCommonLabelBase{scrlayer}{%
    	\Package{scrlayer}%
    }{%
    	\hyperref[cha:scrlayer]{\Package{scrlayer}}%
    }-derived package \IfThisCommonLabelBase{scrlayer-scrpage}{%
    	\Package{scrlayer-scrpage}%
    }{%
    	\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}%
    } is shown in \autoref{sec:scrlayer-scrpage-experts.pagestyle.content},
    \PageRefxmpl{scrlayer-scrpage-experts.cmd.GenericMarkFormat}.%
    \csname iffalse\endcsname}%
    \begin{Example}
      \phantomsection
      \xmpllabel{cmd.GenericMarkFormat}%
      Suppose you want the section numbers of all levels in the running head 
      of an article to be printed in white within a black box. Since the 
      commands \Macro{sectionmarkformat} and \Macro{subsectionmarkformat} of
      the \Package{scrlayer} package are defined with 
      \Macro{GenericMarkFormat} for articles using the standard \LaTeX{} 
      \Class{article} class, you need to redefine only this one command:
\begin{lstcode}
  \documentclass{article}
  \usepackage{blindtext}
  \usepackage[automark]{scrlayer-scrpage}
  \pagestyle{scrheadings}
  \usepackage{xcolor}
  \newcommand*{\numberbox}[1]{%
    \colorbox{black}{\strut~\textcolor{white}{#1}~}}
  \renewcommand*{\GenericMarkFormat}[1]{%
    \protect\numberbox{\csname the#1\endcsname}\enskip}
  \begin{document}
  \blinddocument
  \end{document}
\end{lstcode}
      The colour has been changed using the
      \Package{xcolor}\IndexPackage{xcolor} package. More details can be found
      in that package's manual (see \cite{package:xcolor}). 

      This example also uses an invisible strut. Any detailed \LaTeX{}
      introduction should explain the related command \Macro{strut}.

      A helper macro, \Macro{numberbox}, has been defined to format the number
      within a box. This command is prefixed in the redefinition of
      \Macro{GenericMarkFormat} by \Macro{protect} in order to protect it from
      expansion. This is necessary because otherwise the upper-case letter
      conversion of \Macro{MakeUppercase} for the running head, would result
      in using the colours ``\texttt{BLACK}'' and ``\texttt{WHITE}'' instead
      of ``\texttt{black}'' and ``\texttt{white}'', and those colours are
      undefined. Alternatively, you could define \Macro{numberbox} using
      \Macro{DeclareRobustCommand*} instead of \Macro{newcommand*} and omit
      \Macro{protect} (see \cite{latex:clsguide}).

      If you wanted to achieve the same effect with a \KOMAScript{} class or 
      with the standard \LaTeX{} classes \Class{book} or \Class{report}, you 
      would also have to redefine, respectively,
      \DescRef{scrlayer.cmd.sectionmarkformat}\IndexCmd{sectionmarkformat}%
      \important{\DescRef{scrlayer.cmd.sectionmarkformat}} and
      \DescRef{scrlayer.cmd.subsectionmarkformat}%
      \IndexCmd{subsectionmarkformat}%
      \important{\DescRef{scrlayer.cmd.subsectionmarkformat}}, or
      \DescRef{scrlayer.cmd.chaptermarkformat}%
      \IndexCmd{chaptermarkformat}%
      \important{\DescRef{scrlayer.cmd.chaptermarkformat}} and
      \DescRef{scrlayer.cmd.sectionmarkformat}%
      \IndexCmd{sectionmarkformat}%
      \important{\DescRef{scrlayer.cmd.sectionmarkformat}}, because
      these are not by default defined using \Macro{GenericMarkFormat}:
\begin{lstcode}
  \documentclass{scrbook}
  \usepackage{blindtext}
  \usepackage[automark]{scrlayer-scrpage}
  \pagestyle{scrheadings}
  \usepackage{xcolor}
  \newcommand*{\numberbox}[1]{%
    \colorbox{black}{\strut~\textcolor{white}{#1}~}}
  \renewcommand*{\GenericMarkFormat}[1]{%
    \protect\numberbox{\csname the#1\endcsname}\enskip}
  \renewcommand*{\chaptermarkformat}{\GenericMarkFormat{chapter}}
  \renewcommand*{\sectionmarkformat}{\GenericMarkFormat{section}}
  \begin{document}
  \blinddocument
  \end{document}
\end{lstcode}
    \end{Example}
  \fi% 
  \EndIndexGroup


  \begin{Declaration}
    \Macro{righttopmark}%
    \Macro{rightbotmark}%
    \Macro{rightfirstmark}%
    \Macro{lefttopmark}%
    \Macro{leftbotmark}%
    \Macro{leftfirstmark}
  \end{Declaration}
  \LaTeX\ChangedAt{v3.16}{\Package{scrlayer}} typically uses a two-part
  \TeX{} mark for page styles. Running heads can access the left part of that 
  mark with \DescRef{scrlayer.cmd.leftmark}%
  \important{\DescRef{scrlayer.cmd.leftmark}}\IndexCmd{leftmark} and the right
  part with \DescRef{scrlayer.cmd.rightmark}%
  \important{\DescRef{scrlayer.cmd.rightmark}}\IndexCmd{rightmark}. In fact,
  it was probably intended to use \DescRef{scrlayer.cmd.leftmark} for the
  running head of left (even) pages and \DescRef{scrlayer.cmd.rightmark} for
  the running head of right (odd) pages of two-sided documents. In
  one-sided printing, however, the standard classes do not even set the left
  part of the mark.

  \TeX{} itself knows three ways to access a mark. The \Macro{botmark}%
  \IndexCmd{botmark}\important{\Macro{botmark}} is the last valid mark of the
  most recent page that has been built. If no mark has been set on the page,
  it corresponds to the last mark set on the pages that have already been
  shipped out. The \LaTeX{} command \DescRef{scrlayer.cmd.leftmark} uses
  precisely this mark, so it returns the left part of the last mark of the
  page. This corresponds exactly to \Macro{leftbotmark}%
  \important{\Macro{leftbotmark}}. By comparison, \Macro{rightbotmark}%
  \important{\Macro{rightbotmark}} prints the right part of this mark.

  \Macro{firstmark}\IndexCmd{firstmark}\important{\Macro{firstmark}} is the
  first mark of the last page that has been built. This is the first mark that
  has been set on the page. If no mark has been set on the page, it
  corresponds to the last mark of the pages that have already been shipped
  out. The \LaTeX{} command \DescRef{scrlayer.cmd.rightmark} uses precisely
  this mark, so it returns the right part of the first mark of the page. This
  corresponds exactly to \Macro{rightfirstmark}%
  \important{\Macro{rightfirstmark}}. By comparison, \Macro{leftfirstmark}%
  \important{\Macro{leftfirstmark}} prints the left part of this mark.

  \Macro{topmark}\IndexCmd{topmark}\important{\Macro{topmark}} is the content
  that \Macro{botmark} had before building the current page. \LaTeX{} itself
  does not use it. Nevertheless, \IfThisCommonLabelBase{scrlayer}{%
    \Package{scrlayer}%
  }{%
    \hyperref[cha:scrlayer]{\Package{scrlayer}}%
  } provides \Macro{lefttopmark}\important{\Macro{lefttopmark}} to access the
  left part of this mark and \Macro{righttopmark}%
  \important{\Macro{righttopmark}} to access the right part.

  Note\textnote{Attention!} that the left and right portions of the mark
  can only be set together. Even if you use
  \DescRef{scrlayer.cmd.markright}\IndexCmd{markright} to change only the
  right part, the left part will set again (unchanged). Accordingly, in
  two-sided printing, using the \PageStyle{headings}%
  \important{\PageStyle{headings}}\IndexPagestyle{headings} page style,
  the higher section levels always make both parts. For example,
  \DescRef{scrlayer.cmd.chaptermark} uses \DescRef{scrlayer.cmd.markboth} with
  an empty right argument in this case. This is the reason 
  \DescRef{scrlayer.cmd.rightmark} or \Macro{rightfirstmark} always shows an
  empty value on pages which start a chapter, even if there was a
  \DescRef{scrlayer.cmd.sectionmark} or \DescRef{maincls.cmd.section} on the
  same page to make the right part of the mark.

  Please note\textnote{Attention!} that using any of these commands to show
  the left or right part of the mark as part of the page content may lead to
  unexpected results. They are really meant for use in the header or footer 
  of a page style only. Therefore, they should always be part of the contents
  of a layer when using \IfThisCommonLabelBase{scrlayer}{%
    \Package{scrlayer}%
  }{%
    \hyperref[cha:scrlayer]{\Package{scrlayer}}%
  }. But it does not matter whether the layer is restricted to the background
  or the foreground, since all layers are shipped out after building the
  current page.

  If you need more information about the mark mechanism 
  \iffree{of \TeX{}}{\unskip}, please have a look at 
  \cite[chapter~23]{knuth:texbook}. The topic is flagged there as an issue for
  real experts. \IfThisCommonLabelBase{scrlayer}{% Umbruchkorrektur
  So if the explanation above confused you, please don't worry about it.}{}%
  \EndIndexGroup


  \begin{Declaration}
    \Macro{@mkleft}\Parameter{left mark}%
    \Macro{@mkright}\Parameter{right mark}%
    \Macro{@mkdouble}\Parameter{mark}%
    \Macro{@mkboth}\Parameter{left mark}\Parameter{right mark}
  \end{Declaration}
  Within classes and packages, you may only want to use running heads if
  automatic running heads are active (see the
  \DescRef{scrlayer.option.automark} option and the
  \DescRef{scrlayer.cmd.automark} command on
  \DescPageRef{scrlayer-scrpage.cmd.automark}). In the standard \LaTeX{}
  classes, this only works with \Macro{@mkboth}. This command corresponds to
  either \Macro{@gobbletwo}, which simply consumes both mandatory arguments, 
  or \DescRef{scrlayer.cmd.markboth}, which sets both the \PValue{left mark} 
  and the \PValue{right mark}. Packages like \Package{babel} also change 
  \Macro{\@mkboth}, e.\,g., to enable language switching in the running head.

  However, if you want to change only the \PName{left mark} or the 
  \PName{right mark} without changing the other one, there is no corresponding
  command. The \IfThisCommonLabelBase{scrlayer}{%
    \Package{scrlayer}%
  }{%
    \hyperref[cha:scrlayer]{\Package{scrlayer}}%
  } package itself needs such commands to implement automatic running heads.
  So if \Macro{@mkleft}, for setting the left mark only, or \Macro{@mkright},
  for setting the right mark only, or \Macro{@mkdouble}, for setting both
  marks with the same content, is undefined when loading 
  \IfThisCommonLabelBase{scrlayer}{%
    \Package{scrlayer}%
  }{%
    \hyperref[cha:scrlayer]{\Package{scrlayer}}%
  }, this package will define them. This definition uses the state of
  \Macro{@mkboth} as an indication of whether to use automatic running heads.
  The commands will set the marks only in the case of automatic running heads.

  Class and package authors can also fall back on these commands as appropriate
  if they want to set the left or right the marks only if automatic running
  heads are activated.%
  \EndIndexGroup%
\fi%
%
\IfThisCommonLabelBase{scrlayer}{%
  \par
  For more information about manipulating the contents of page styles, see
  also \autoref{sec:scrlayer-scrpage.pagestyle.content} starting at
  \autopageref{sec:scrlayer-scrpage.pagestyle.content}.%
}{}%
\EndIndexGroup

%%% Local Variables:
%%% mode: latex
%%% mode: flyspell
%%% ispell-local-dictionary: "en_GB"
%%% TeX-master: "../guide.tex"
%%% TeX-PDF-mode: t
%%% End: